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.15 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.14 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.13 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.12 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.11 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.10 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.9 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.8 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.7 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.6 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.5 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.4 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.3 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.2 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.1 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.1.0 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.0.6 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.0.5 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.0.4 tracks/perl6/exercises/phone-number/Example.pm6
trackler-2.2.0.3 tracks/perl6/exercises/phone-number/Example.pm6