; From Chapter 1
(define sqr (x) (* x x))
(define abs (x) (if (< x 0) (- 0 x) x))
(define +1 (x) (+ x 1))
(define and (x y) (if x y x))
(define or (x y) (if x x y))
(define not (x) (if x 0 1))
(define <> (x y) (not (= x y)))
(define >= (x y) (or (> x y) (= x y)))
(define <= (x y) (or (< x y) (= x y)))
(define mod (m n) (- m (* n (/ m n))))
(define min (x y) (if (< x y) x y))
(define max (x y) (if (> x y) x y))
; Section 6.2.3
(cluster List
    ; Exports: nil, null?, cons, car, cdr, rplaca, rplacd
    (rep type a d)
    (define nil () (List 0 0 0))
    (define null? (l) (= (type l) 0))
    (define cons (item l) (List 1 item l))
    (define car (l) (a l))
    (define cdr (l) (d l))
    (define rplaca (l a) (set-a l a))
    (define rplacd (l d) (set-d l d))
)
