RosettaCodeData/Task/Permutations/Julia/permutations-1.julia
2023-07-01 13:44:08 -04:00

1 line
87 B
Text

julia> perms(l) = isempty(l) ? [l] : [[x; y] for x in l for y in perms(setdiff(l, x))]