Permutations: Difference between revisions
m
→{{header|Perl 6}}: 'singularizer' not needed
m (→{{header|Generic version}}: updated so that it doesn't copy the set each time (but still records values to iterate over)) |
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: 'singularizer' not needed) |
||
Line 5,078:
=={{header|Perl 6}}==
{{works with|rakudo|
First, you can just use the built-in method on any list type.
<lang Perl6>.say for <a b c>.permutations</lang>
Line 5,102:
my $s = $j + 1;
@a[ $r--, $s++ ] .= reverse while $r > $s;
return
}
|