Sha256: bf9ea365bff71eab6af74770b518d649f7437662dda7ab98e8198215f563f367
Contents?: true
Size: 602 Bytes
Versions: 66
Compression:
Stored size: 602 Bytes
Contents
exercise: Grains version: 2 plan: 11 tests: |- for @($c-data<cases>[0]<cases>) { if .<expected> == -1 { throws-like { grains-on-square(.<input><square>) }, Exception, .<description>; } else { is grains-on-square(.<input><square>), |.<expected description>; } } is total-grains, |$c-data<cases>[1]<expected description>; unit: module example: |- sub grains-on-square ($number) is export { die if $number < 1 or $number > 64; 2**($number-1); } sub total-grains is export { my Int $total; for 1..64 { $total += grains-on-square($_) } $total; }
Version data entries
66 entries across 66 versions & 1 rubygems