A list is a sequence of S-expressions, separated by whitespace (spaces, tabs, newlines, and formfeeds), and surrounded by parentheses. Note that each S-expression can itself be a list, so the following are all valid lists: (1 2 3), (1 (2 3)), (1 (2 (3))), etc. In addition, a special list is defined that has no elements. This is called the empty list , or the null list , and is written () or nil .
Lists may be left unevaluated in the same manner as atoms, by quoting them.
'(1 2 3) (1 2 3)If a list is to be evaluated, its first element is considered to be a function name, and the remaining elements are arguments to that function. The number of arguments a function expects is called its arity . For instance, the addition function is called ` +', and it has an arity of two. For example,
(+ 2 3) 5As with all lists, the arguments to a function may themselves be function calls. For example,
(+ (+ 2 3) (+ 5 6)) 16