RosettaCodeData/Task/Executable-library/Raku/executable-library-3.raku

5 lines
180 B
Raku
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
use Hailstone;
my %score;
(1 .. 100_000).race.map: { %score{hailstone($_).elems}++ };
say "Most common length is {.key}, occurring {.value} times." given max :by(*.value), %score;