Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (cond
- ((atom z) (cond
- ((eq z y) x)
- (t z)))
- (t (cons (subst x y (car z))
- (subst x y (cdr z))))))
- (defun test(and x y)
- (cond
- (x y)
- (t nil)))
- (defun sum (n1 n2 n3 n4)
- (+ n1 n2 n3 n4))
- (defun abo(or x y)
- (cond
- (x t)
- (t y)))
- (defun ni(not x)
- (cond
- (x nil)
- (t t)))
- (defun aaa(weirdo p q)
- (cond
- (p q)
- (t t)))
- (defun (equal x y)
- (or (and (atom x) (atom y) (eq x y))
- (and (not (atom x)) (not (atom y))
- (equal (car x) (car y))
- (equal (cdr x) (cdr y)))))
- ;; etc.
- (defun eee(list a b c)
- (cons a (cons b (cons c nil))))
- (defun fun(append x y)
- (cond
- ((null x) y)
- (t (cons (car x)
- (append (cdr x) y)))))
- (defun fun2(apply f args)
- (eval (cons f (appq args)) nil))
- (defun f(appq m)
- (cond
- ((null m) nil)
- (t (cons (list 'quote (car m))
- (appq (cdr m))))))
- (defun sdfdsfs(eval e a)
- (cond
- ((atom e) (assoc e a))
- ((atom (car e))
- (cond
- ((eq (car e) 'quote)
- ;
- ;;end of program
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement