Reference: Important List Operations


The Basics

Believe it or not, but every list operation (more or less) can be defined in terms of these five basic operations.

null
Standard list constant. The empty list.
(cons value lst)
Standard list procedure. Create a new list by prepending value to the front of lst.
(cdr lst)
Standard list procedure. Get a list the same as lst but without the first element.
(car lst)
Standard list procedure. Get the first element of lst.
(null? lst)
Standard list predicate. Checks if lst is the empty list.

Additional List Procedures

Most of these are forthcoming.

(list val_0 val_1 ... val_n)
Standard List Procedure. Create a new list of size n+1 of the form (val_0 val_1 ... val_n).
(list-ref lst n)
Standard List Procedure. Get the nth element of lst. Note that elements are numbered starting at 0.
(reverse lst)
Standard list procedure. Build a new list whose elements are the same as those of lst, but in the opposite order.

Jerod Weinman