                        
(rplacd func ((fexpr lambda (x a) (list (quote funarg) (cons (qu
ote lambda) x) a)))) 
(rplacd append ((expr lambda (x y) (nconc (maplist x (func (z) z
)) y)))) 
(rplacd pdef ((expr lambda (x) (list (quote rplacd) x (cdr x))))
) 
(rplacd pfd ((expr lambda (x) (cons (assoc (caar (cdr x)) (quote
 ((expr.de) (fexpr.df))) nil) (cons x (cddr (cadr x))))))) 
(rplacd assoc ((expr lambda (x y z) (cdr (sassoc x y (func nil (
cons nil z))))))) 
(rplacd fix ((expr lambda (x y z) (rplacd x (subsr z y (cdr x)))
))) 
(rplacd de ((expr lambda (n v d) (def n (quote expr) (cons (quot
e lambda) (list v d)))))) 
(rplacd sub1 ((expr lambda (x) (plus -1 x)))) 
(rplacd subsr ((expr lambda (x y z) (cond ((equal y z) x) ((atom
 z) z) (t (rplacd (rplaca z (subsr x y (car z))) (subsr x y (cdr
 z)))))))) 
(rplacd subst ((expr lambda (x y z) (cond ((equal y z) x) ((atom
 z) z) (t (cons (subst x y (car z)) (subst x y (cdr z)))))))) 
(rplacd df ((expr lambda (n v d) (def n (quote fexpr) (cons (quo
te lambda) (list v d)))))) 
(rplacd cset ((expr lambda (x y) (def x (quote apval) y)))) 
(rplacd csetq ((fexpr lambda (x a) (cset (car x) (eval (cadr x) 
a))))) 
(rplacd add1 ((expr lambda (x) (plus 1 x)))) 
(rplacd and ((fexpr lambda (x a) (prog nil b (cond ((null x) (re
turn t)) ((null (eval (car x) a)) (return nil))) (setq x (cdr x)
) (go b))))) 
(rplacd maplist ((expr lambda (xx yy) (prog (zz) aa (cond ((null
 xx) (return zz))) (setq zz (nconc zz (list (yy (car xx))))) (se
tq xx (cdr xx)) (go aa))))) 
(rplacd map ((expr lambda (xx yy) (prog nil aa (cond ((null xx) 
(return nil))) (yy (car xx)) (setq xx (cdr xx)) (go aa))))) 
(rplacd dump ((expr lambda (n l) (prog2 (map l (func (y) (print 
(pdef y)))) (list (quote stop) n))))) 
(rplacd untrace ((expr lambda (x) (prog (y) (cond ((traced x) (r
placa (setq y (cdr (cddr (cadr x)))) (car (cddr (cadr (cddr (cda
r y)))))))) (return x))))) 
(rplacd traced ((expr lambda (x) (equal (cadr (cadr (cddr (cadr 
x)))) (quote (99g)))))) 
(rplacd trace ((expr lambda (x) (prog (y) (cond ((null (traced x
)) (rplaca (cdr (setq y (cddr (cadr x)))) (list (quote prog) (qu
ote (99g)) (list (quote print) (list (quote quote) (list (quote 
entering) x))) (list (quote print) (cons (quote list) (car y))) 
(list (quote setq) (quote 99g) (cadr y)) (list (quote print) (li
st (quote quote) (list (quote leaving) x))) (quote (return (prin
t 99g))))))) (return x))))) 
(rplacd length ((expr lambda (x) (prog (n) (setq n 0) a (cond ((
atom x) (return n))) (setq x (cdr x)) (setq n (add1 n)) (go a)))
)) 
(rplacd ldel ((expr lambda (x y) (cond ((atom y) y) ((member (ca
r y) x) (ldel x (cdr y))) (t (cons (ldel x (car y)) (ldel x (cdr
 y)))))))) 
(rplacd alist ((fexpr lambda (x a) a))) 
(rplacd or ((fexpr lambda (x a) (prog nil b (cond ((null x) (ret
urn nil)) ((eval (car x) a) (return t))) (setq x (cdr x)) (go b)
)))) 
(rplacd load ((fexpr lambda (x a) (prog nil b (cond ((atom (cadr
 (setq a (read)))) (return (eval a nil))) ((member (cadr (cadr a
)) x) (print (eval a nil)))) (go b))))) 
(rplacd elim ((fexpr lambda (x a) (rplacd (car x) (ldel (cdr x) 
(cdar x)))))) 
(rplacd terpri ((expr lambda nil (prin1 .
)))) 
(rplacd find ((expr lambda (x y) (prog (n v) (setq n 0) a (cond 
((equal x y) (return nil)) ((atom y) (return t)) ((null (eq (set
q v (find x (car y))) t)) (return (cons n v)))) (setq n (add1 n)
) (setq y (cdr y)) (go a))))) 
(rplacd fetch ((expr lambda (s x) (cond ((null s) x) ((eq (car s
) 0) (fetch (cdr s) (car x))) (t (fetch (cons (sub1 (car s)) (cd
r s)) (cdr x))))))) 
(rplacd insert ((expr lambda (x y z) (rplacd x (insrt z y (cdr x
)))))) 
(rplacd insrt ((expr lambda (x y z) (cond ((atom z) z) ((equal (
car z) y) (cons (insrt x y (car z)) (append x (insrt x y (cdr z)
)))) (t (cons (insrt x y (car z)) (insrt x y (cdr z)))))))) 
(rplacd def ((expr lambda (x p v) (rplacd x (list (cons p v)))))
) 
(rplacd function ((fexpr lambda (x a) (list (quote funarg) (car 
x) a)))) 
(rplacd dumpu ((expr lambda (n) (dump n (quote (func append pdef
 pfd assoc fix de sub1 subsr subst df cset csetq add1 and maplis
t map dump untrace traced trace length ldel alist or load elim t
erpri find fetch insert insrt def function dumpu)))))) 
(stop 15)                                               
                                                            
