tracks/perl6/exercises/phone-number/example.yaml in trackler-2.1.0.33 vs tracks/perl6/exercises/phone-number/example.yaml in trackler-2.1.0.34
- old
+ new
@@ -8,5 +8,15 @@
is clean-number(.<phrase>), |.<expected description>;
} else {
nok clean-number(.<phrase>), .<description>;
}
}
+
+unit: module
+example: |
+ sub clean-number ($number is copy) is export {
+ $number ~~ s:g/<:!Nd>//;
+ $number ~~ /^ 1? ( [ <[2..9]> <:Nd> ** 2 ] ** 2 <:Nd> ** 4 ) $/ ?? ~$0 !! Nil;
+ }
+stub: |
+ sub clean-number ($number) is export {
+ }