Jump to content

Permutations: Difference between revisions

m
Undo revision 146579 by Grondilu (talk) not needed on second thought
(→‎{{header|Perl 6}}: make it behave nice with empty arrays)
m (Undo revision 146579 by Grondilu (talk) not needed on second thought)
Line 1,802:
Here is a quick and simple recursive implementation:
<lang Perl6>
multi postfix:<!>(@a where 0|1) { [@a] }
multi postfix:<!>(@a) {
gather for @a -> $a {
1,934

edits

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