[erlang-questions] create list quesion

Imants Cekusins imantc@REDACTED
Tue Jan 27 19:28:47 CET 2015


a variable which is a list appears as a regular variable:

List = [1,2].

[H | T] = List.

H = 1.
T = [2].   % tail is always a list

[List] with List being a list, is a deep / nested list:
[[1,2]] = [List].
[List,3] = [[1,2],3].



More information about the erlang-questions mailing list