[erlang-questions] List Comprehensions permutation
Thu Apr 2 21:34:49 CEST 2009
I recently bought the book "Programming Erlang" by Joe Armstrong and I
have a little problem of comprehension about the logical of an
Here is the sample from the book :
perms() -> [];
[[H|T] || H <- L, T <- perms(L--[H])].
I would like to know why we return [] and not  ?
I have try some tests :
6> [[H|T] || H <- , T <- ].
7> [[H|T] || H <- , T <- []].
For me it's not logical, in my brain its should be something like :
(all the sample are paste from erlang shell).
Someone can "light" me about this ?
Thanks in advance.
More information about the erlang-questions