From: Devin Mullins Date: 2006-11-27T23:21:52+09:00 Subject: Re: ruby and list comprehension piggybox wrote: > in Haskell: > permutation [] = [[]] > permutation xs = [x:ys | x <- xs, ys <- permutation (delete x xs)] > > in Erlang: > permutation([]) -> [[]]; > permutation(L) -> [[H|T] || H <- L, T <- permutation(L--[H])]. > > really neat, isn't it? Yes. :)