RosettaCodeData/Task/Executable-library/Perl-6/executable-library-3.pl6

5 lines
180 B
Raku
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
use Hailstone;
2019-09-12 10:33:56 -07:00
my %score;
(1 .. 100_000).race.map: { %score{hailstone($_).elems}++ };
2016-12-05 22:15:40 +01:00
say "Most common length is {.key}, occurring {.value} times." given max :by(*.value), %score;