Sha256: 04ea5420d5766eca0787999e2786e48e2c1a0ab33f07e2179d4b188ebd897001
Contents?: true
Size: 554 Bytes
Versions: 42
Compression:
Stored size: 554 Bytes
Contents
exercise: Raindrops version: 3 plan: 18 tests: |- for @($c-data<cases>) { subtest { plan 2; is .<input><number>.&raindrop, |.<expected description>; isa-ok .<input><number>.&raindrop, Str; } } unit: module example: |- sub raindrop (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 raindrop ($num) is export { }
Version data entries
42 entries across 42 versions & 1 rubygems