Sha256: 0fc914e12f343f3dc66c648dacc9ab59da3097fcbe12b0f00636b632f1cf8df8
Contents?: true
Size: 556 Bytes
Versions: 42
Compression:
Stored size: 556 Bytes
Contents
exercise: Raindrops version: 1 plan: 20 imports: '&convert' tests: |- for @($c-data<cases>) { subtest { 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 { }
Version data entries
42 entries across 42 versions & 1 rubygems