[erlang-questions] create list quesion

Imants Cekusins imantc@REDACTED
Tue Jan 27 19:34:32 CET 2015


One_item_list = [atom1].

[A] = One_item_list.
A = atom1.

One item list may be pattern matched to H|T:
[H|T] = One_item_list.
H = atom1.
T = [].

 [A,B] = One_item_list.
** exception error: no match of right hand side value [atom1]

[A,B] = [1,2,3].
** exception error: no match of right hand side value [1,2,3]



More information about the erlang-questions mailing list