Believe it or not, but every list operation (more or less) can be defined in terms of these five basic operations.
null
(cons
value
lst)
value
to the front of lst.
(cdr
lst)
lst but without
the first element. (car
lst)
lst.
(null?
lst)
lst is the empty list.
Most of these are forthcoming.
(list
val_0
val_1 ...
val_n)
n+1 of the form
(val_0 val_1
... val_n).
(list-ref
lst
n)
nth element of
lst. Note that elements are numbered
starting at 0.
(reverse
lst)
lst, but in the opposite order.