© Gary D. Knott 2017

Gary D. Knott, Interpreting LISP, 10.1007/978-1-4842-2707-7_10

10. List Notation

Gary D. Knott

(1)Civilized Software Inc., Silver Spring, Maryland, USA

Some forms of nonatomic S-expressions arise so frequently there is a special notation for them. A dotted-pair of the form ( S 1 . ( S 2 . (· · · . ( S k . NIL)· · ·))) where S 1, S 2, . . . , S k are all S-expressions is called a list and is written as ( S 1 S 2 ... S k ), which is the sequence of S-expressions S 1, S 2, . . . , S k written with intervening blanks and enclosed in parentheses. There is no confusion with dot notation since there are no dots between the S i elements in the list. There may, of course, be dots within some or all of the elements S 1, . . . , S

Get Interpreting LISP: Programming and Data Structures, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.