Constructing List Structure

The basic function that constructs new list structure is the function CONS.

If Y is a list, then we can think of (CONS X Y) as adding the new element X to the front of the list Y.


(CONS 'A '(B))      =  (A B)

(CONS 'A NIL)       =  (A)

(CONS 'A '())       =  (A)

(CONS '(A) '(B))    =  ((A) B)

(CONS 'A 'B)        =  (A . B)

The following axioms always hold:

  1. (CAR (CONS x y)) = x

  2. (CDR (CONS x y)) = y

Contents    Page-10    Prev    Next    Page+10    Index