Erlang Central

List

Revision as of 08:31, 2 September 2006 by Rvg (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A list is a finite ordered sequence of elements.

A list can contain any valid Erlang element:

A list is indicated by enclosing elements in [ ].

Examples:

[1,2,3,4]
["String",[1,2,3],atom,5].

A String is a list of characters. The string "ABC" is equivalent to the list [41,42,43].