pairs
primitive procedures
- (cons a b) evaluates to a cons cell containing the values of a and b
- (car c) evaluates to the first element of the cons cell c
- (cdr c) evaluates to the second element of the cons cell c
- (pair? p) evaluates to #t when p is a cons cell
examples
- (car (cons 1 3)) –> 1
- (car 3) /–>
- (define x (cons 1 2))
- (cons (car x) (cdr x)) –> (1.2)