Sha256: 8bfbc43c087f0a86de635980d2ed9bb3420cce33b7ed7f86d4938720b38c5b12

Contents?: true

Size: 184 Bytes

Versions: 148

Compression:

Stored size: 184 Bytes

Contents

unit module Phone:ver<3>;

sub clean-number ($number is copy) is export {
  $number ~~ s:g/<:!Nd>//;
  $number ~~ /^ 1? ( [ <[2..9]> <:Nd> ** 2 ] ** 2 <:Nd> ** 4 ) $/ ?? ~$0 !! Nil;
}

Version data entries

148 entries across 148 versions & 1 rubygems

Version Path
trackler-2.2.1.95 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.94 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.93 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.92 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.91 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.90 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.89 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.88 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.87 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.86 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.85 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.84 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.83 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.82 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.81 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.80 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.79 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.78 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.77 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.76 tracks/perl6/exercises/phone-number/Example.pm6