[erlang-questions] wierd list comprehension outcomes
Sun Jan 25 11:28:35 CET 2015
I follow this book : Erlang programming and I did read chapter 2.
Now I have to do this exercise :
C. Recursive list definitions
L = [A|[2,3]].
[H|T] = L.
So I did this on the ERl and I saw this outcome
* L = L = [A|[2,3]].
[1,2,3] which is expected
* 2: syntax error before: '[' which I expected to see also [ 1 , 2
* [H|T] = L.
Which I see ** exception error: no match of right hand side value [1,2,3]
where I was expected to see  [ 2, 3]
Can someone help me figure out where my thinking took the wrong turn.
More information about the erlang-questions