Sha256: 61d52371f0a6b0a58e164bc9e121ea5c5eff3683668c3a2254271f4cab5e9d8b

Contents?: true

Size: 189 Bytes

Versions: 35

Compression:

Stored size: 189 Bytes

Contents

unit module Phone:ver<1>;

sub clean-number ($number is copy) is export {
  $number ~~ /<:L>/ ?? return Nil !! $number ~~ s:g/<:!Nd>//;
  $number ~~ /^ 1? (<:Nd> ** 10) $/ ?? ~$0 !! Nil;
}

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
trackler-2.1.0.7 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.1.0.6 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.1.0.5 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.1.0.4 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.1.0.3 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.1.0.2 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.1.0.1 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.1.0.0 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.55 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.54 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.53 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.52 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.51 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.50 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.49 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.48 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.47 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.46 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.45 tracks/perl6/exercises/phone-number/Example.pm
trackler-2.0.8.44 tracks/perl6/exercises/phone-number/Example.pm