Jump to content

Executable library: Difference between revisions

m
→‎{{header|Perl 6}}: Add concurrency, not that it really matters
mNo edit summary
m (→‎{{header|Perl 6}}: Add concurrency, not that it really matters)
Line 1,141:
It can then be used with a program such as:
<lang perl6>use Hailstone;
my %score;
my(1 %score;.. 100_000).race.map: { %score{hailstone($_).elems}++ for 1 .. 100_000};
say "Most common length is {.key}, occurring {.value} times." given max :by(*.value), %score;</lang>
 
10,333

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.