tracks/perl6/exercises/raindrops/example.yaml in trackler-2.1.0.33 vs tracks/perl6/exercises/raindrops/example.yaml in trackler-2.1.0.34
- old
+ new
@@ -8,5 +8,20 @@
plan 2;
is .<number>.&convert, |.<expected description>;
isa-ok .<number>.&convert, Str;
}
}
+
+unit: module
+example: |
+ sub convert (Int:D $num --> Str:D) is export {
+ my $str = '';
+ given $num {
+ when * %% 3 {$str ~= 'Pling'; proceed}
+ when * %% 5 {$str ~= 'Plang'; proceed}
+ when * %% 7 {$str ~= 'Plong'}
+ }
+ return $str ?? $str !! $num.Str;
+ }
+stub: |
+ sub convert ($num) is export {
+ }