[erlang-questions] wierd list comprehension outcomes

Imants Cekusins imantc@REDACTED
Sun Jan 25 18:53:58 CET 2015


a little more on list as a Head:

2> A = [ [1,2] | [3,4] ].
[[1,2],3,4]
3> [ H | T ] = A.
[[1,2],3,4]
4> H.
[1,2]

in other words, in
[ H | T ]
H is added as, and stays a single item.



More information about the erlang-questions mailing list