Permutations: Difference between revisions

Content added Content deleted
(→‎{{header|Erlang}}: Get rid of ++ append operation in zipper)
(→‎{{header|Erlang}}: fix shell code)
Line 898:
Y-combinator (for shell):
<lang Erlang>
F = fun(L) -> G = fun(_, []) -> [[]]; (F, L) -> [[X|Y] || X<-L, Y<-F(F, L--[X])] end, G(G, L) end.
</lang>
More efficient zipper implementation: