Topswops: Difference between revisions
m
→{{header|Perl 6}}: use built-in for permutations, use 'sort' not '[max]' to avoid reduction limit
m (→{{header|Lua}}: typo) |
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: use built-in for permutations, use 'sort' not '[max]' to avoid reduction limit) |
||
Line 1,362:
=={{header|Perl 6}}==
<lang perl6>sub
my $count = 0;
until @a[0] == 1 {
Line 1,378 ⟶ 1,370:
return $count;
}
sub topswops($n) {
say "$_ {topswops $_}" for 1 .. 10;</lang>
|