;; Dribble started 2005-01-08 18:04:00 # [2]> (car 'a b c)) *** - EVAL: too many arguments given to CAR: (CAR 'A B C) 1. Break [3]> (car '(a b c)) A 1. Break [3]> (car '((a b)(c d))) (A B) 1. Break [3]> (car (crd'(a b c d))) *** - EVAL: the function CRD is undefined 2. Break [4]> (car (cdr'(a b c d))) B 2. Break [4]> (crd '(a b c)) *** - EVAL: the function CRD is undefined 3. Break [5]> (cdr '(a b c)) (B C) 3. Break [5]> (cdr '((a b)(c d))) ((C D)) 3. Break [5]> (cdr '(a b c d)) (B C D) 3. Break [5]> (caddr '(a b c d)) C 3. Break [5]> (caddr '(a b)) NIL 3. Break [5]> (cadddr '(a b c d)) D 3. Break [5]> (cons 'a 'b) (A . B) 3. Break [5]> (cons 'a '(b c)) (A B C) 3. Break [5]> (cons (+ 3 4) (* 5 5)) (7 . 25) 3. Break [5]> (cons '(1 2) '(3 4)) ((1 2) 3 4) 3. Break [5]> (cons nil 1) (NIL . 1) 3. Break [5]> (cons 1 nil) (1) 3. Break [5]> (cons) *** - EVAL: too few arguments given to CONS: (CONS) 4. Break [6]> (cons (1 2) '(3 4)) *** - EVAL: 1 is not a function name 5. Break [7]> (cons '(1 2) '(3 4)) ((1 2) 3 4) 5. Break [7]> (cons '(1 2) '(+3 4)) ((1 2) 3 4) 5. Break [7]> (cons '(1 2) (+3 4)) *** - EVAL: 3 is not a function name 6. Break [8]> (cons '(1 2) (+ 3 4)) ((1 2) . 7) 6. Break [8]> (cons '(1 2) '(+ 3 4)) ((1 2) + 3 4) 6. Break [8]> (cons (+ 1 2) '(+ 3 4)) (3 + 3 4) 6. Break [8]> (cons '(+ 1 2) '(+ 3 4)) ((+ 1 2) + 3 4) 6. Break [8]> (list 1 2 3 4 5) (1 2 3 4 5) 6. Break [8]> (list 'a '(b c) (+ 3 4) '() '*) (A (B C) 7 NIL *) 6. Break [8]> (set 'var '(1 2 3 4)) (1 2 3 4) 6. Break [8]> (list? var) *** - EVAL: the function LIST? is undefined 7. Break [9]> (list var) ((1 2 3 4)) 7. Break [9]> (set 'x 123) 123 7. Break [9]> (set 'x 'y) Y 7. Break [9]> y *** - EVAL: variable Y has no value 8. Break [10]> (car x) *** - CAR: Y is not a list 9. Break [11]> (+ x y) *** - EVAL: variable Y has no value 10. Break [12]> (+ x 5) *** - argument to + should be a number: Y 11. Break [13]> (set 'x 123) 123 11. Break [13]> (+ x 5) 128 11. Break [13]> (set 'x 'y) Y 11. Break [13]> (set 'alist '(1 2 3)) (1 2 3) 11. Break [13]> (set 'x 1 'y "hello") *** - EVAL: too many arguments given to SYSTEM::SET-SYMBOL-VALUE: (SET 'X 1 'Y "hello") 12. Break [14]> (set 'x 1) 1 12. Break [14]> ;; Dribble started 2005-01-08 18:44:19 # [2]> (set 'lst '(x y z)) (X Y Z) [3]> (set (first lst) 123) 123 [4]> x 123 [5]> (setq x 123) 123 [6]> (setq x 1 y 2 z 3) 3 [7]> x 1 [8]> y 2 [9]> z 3 [10]> (define (classify x) (cond ( (< x 0) "negative") ( (< x 10) "small") ( (< x 20) "medium") ( (>= x 30) "big"))) *** - EVAL: the function DEFINE is undefined 1. Break [11]> (define x 5) *** - EVAL: the function DEFINE is undefined 2. Break [12]> (cond (< x 0) "negative")) *** - EVAL: variable < has no value 3. Break [13]> (cond ((+ 3 4))) 7 3. Break [13]> (defun (classify x) (cond ( (< x 0) "negative") ( (< x 10) "small") ( (< x 20) "medium") ( (>= x 30) "big"))) *** - DEFUN: the name of a function must be a symbol, not (CLASSIFY X) 4. Break [14]> (define classify (x) (cond ( (< x 0) "negative") ( (< x 10) "small") ( (< x 20) "medium") ( (>= x 30) "big"))) *** - EVAL: the function DEFINE is undefined 5. Break [15]> (defun classify (x) (cond ( (< x 0) "negative") ( (< x 10) "small") ( (< x 20) "medium") ( (>= x 30) "big"))) CLASSIFY 5. Break [15]> (classify 15) "medium" 5. Break [15]> (classify 22) NIL 5. Break [15]> (classify 100) "big" 5. Break [15]> (classify -10) "negative" 5. Break [15]> (atom '(1 2 3)) NIL 5. Break [15]> (and (atom 123) (atom "hello") (atom 'foo)) T 5. Break [15]> (atom ''foo) NIL 5. Break [15]> (atom foo) *** - EVAL: variable FOO has no value 6. Break [16]> (numberp 14) T 6. Break [16]> (number 14) *** - EVAL: the function NUMBER is undefined 7. Break [17]> (numberp nil) NIL 7. Break [17]> (numberp a) *** - EVAL: variable A has no value 8. Break [18]> set (a 3) *** - EVAL: variable SET has no value 9. Break [19]> (set a 3) *** - EVAL: variable A has no value 10. Break [20]> (set 3 a) *** - EVAL: variable A has no value 11. Break [21]> (set 'a 3) 3 11. Break [21]> (numberp a) T 11. Break [21]> (greaterp 4 5) *** - EVAL: the function GREATERP is undefined 12. Break [22]> (> 4 5) NIL 12. Break [22]> (> 6 5) T 12. Break [22]> (plus 3 6) *** - EVAL: the function PLUS is undefined 13. Break [23]> (+ 3 6) 9 13. Break [23]> (minus 3 6) *** - EVAL: the function MINUS is undefined 14. Break [24]> (minusp 3 6) *** - EVAL: too many arguments given to MINUSP: (MINUSP 3 6) 15. Break [25]> (- 3 6) -3 15. Break [25]> (- 6 3) 3 15. Break [25]> ;; Dribble started 2005-01-08 20:28:24 # [2]> (set '1 '(1 2 3 4 5 6 7 8 9)) *** - SYSTEM::SET-SYMBOL-VALUE: 1 is not a symbol 1. Break [3]> (set 'l '(1 2 3 4 5 6 7 8 9)) (1 2 3 4 5 6 7 8 9) 1. Break [3]> (reverse l) (9 8 7 6 5 4 3 2 1) 1. Break [3]> (set 'str "newLISP") "newLISP" 1. Break [3]> (reverse str) "PSILwen" 1. Break [3]> (nreverse str) "PSILwen" 1. Break [3]> > (= 9 (+ 4 5)) *** - EVAL: variable > has no value 2. Break [4]> (= 9 (+ 4 5)) T 2. Break [4]> (>= 17 4) T 2. Break [4]> (< 8 (+ 4 2)) NIL 2. Break [4]> (oddp 3) T 2. Break [4]> (minusp 6) NIL 2. Break [4]> (minusp -6) T 2. Break [4]> (numberp 17) T 2. Break [4]> (numberp a) *** - EVAL: variable A has no value 3. Break [5]> (numberp "a") NIL 3. Break [5]> (zeroo 0) *** - EVAL: the function ZEROO is undefined 4. Break [6]> (zerop 0) T 4. Break [6]> (zerop 1) NIL 4. Break [6]> (zerop "a") *** - argument to ZEROP should be a number: "a" 5. Break [7]> (plusp 10) T 5. Break [7]> (plusp -10) NIL 5. Break [7]> (plus 4) *** - EVAL: the function PLUS is undefined 6. Break [8]> (greaterp 4 5) *** - EVAL: the function GREATERP is undefined 7. Break [9]> (print "CLISP might be making some sense..") "CLISP might be making some sense.." "CLISP might be making some sense.." 7. Break [9]> ("CLISP might be making some sense..") *** - EVAL: "CLISP might be making some sense.." is not a function name 8. Break [10]> ("CLISP might be making some sense.") *** - EVAL: "CLISP might be making some sense." is not a function name 9. Break [11]> (print"CLISP might be making some sense.") "CLISP might be making some sense." "CLISP might be making some sense." 9. Break [11]> (print"Why does this print twice?") "Why does this print twice?" "Why does this print twice?" 9. Break [11]> (trace true) *** - TRACE: undefined function TRUE 10. Break [12]> (trace 'true) *** - EVAL/APPLY: keyword arguments for # should occur pairwise 11. Break [13]> (trace (true)) *** - TRACE: undefined function TRUE 12. Break [14]> trace (my-func a b c)) *** - EVAL: variable TRACE has no value 13. Break [15]> (trace 1) *** - APPLY: argument list given to # is dotted (terminated by 1) 14. Break [16]> (trace nil) *** - TRACE: undefined function NIL 15. Break [17]> defug (my-func a b c) *** - EVAL: variable DEFUG has no value 16. Break [18]> debug (my-func a b c) *** - EVAL: variable DEBUG has no value 17. Break [19]> ;; Dribble started 2005-01-08 21:30:08 # 6. Break [7]> (eq 3 4) NIL 6. Break [7]> (eq 3 3) T 6. Break [7]> (equal 'a 'a) T 6. Break [7]> (+1 4) *** - EVAL: 1 is not a function name 7. Break [8]> (1+ 4) 5 7. Break [8]> (1- 4) 3 7. Break [8]> (zerop 4) NIL 7. Break [8]> (zerop 0) T 7. Break [8]> (plusp 0) NIL 7. Break [8]> (plusp 3) T 7. Break [8]> (plusp -3) NIL 7. Break [8]> (minusp -3) T 7. Break [8]> (minusp 3) NIL 7. Break [8]> (evenp 3) NIL 7. Break [8]> (evenp 4) T 7. Break [8]> (oddp 4) NIL 7. Break [8]> (oddp 3) T 7. Break [8]> (or 1 1) 1 7. Break [8]> (or 1 0) 1 7. Break [8]> (or 0 0) 0 7. Break [8]> (and 0 0) 0 7. Break [8]> (and 0 1) 1 7. Break [8]> (and 1 1) 1 7. Break [8]> (not 1) NIL 7. Break [8]> (not nil) T 7. Break [8]> (and t nil) NIL 7. Break [8]> (and t t) T 7. Break [8]> (defun newfunc (x) ) NEWFUNC 7. Break [8]> (defun factorial (n) (prog (i f) (setq f 1) (setq i 1) loop (cond ((greaterp i n) (return f)) (t ((setq f(* f i)) (setq i(add1 i)) (go loop) ) ) ) ) ) *** - SYSTEM::%EXPAND-FORM: (SETQ F (* F I)) should be a lambda expression 8. Break [9]> (defun while macro (P) (subst (cadr P) 'C) (subst (caddr P) 'B) '(prog () oop (cond ((greaterp C 0) (B (setq C (sub1 C)) (go loop) ) ) ) ) ) *** - FUNCTION: lambda-list for WHILE should be a list, not MACRO 9. Break [10]> (defun fact (n) (cond ((equal n 0) 1) (t (* n (fact (- n 1)))))) FACT 9. Break [10]> (set 'n 3) 3 9. Break [10]> (defun fact (n) (cond ((equal n 0) 1) (t (* n (fact (- n 1)))))) FACT 9. Break [10]> (nth 3 '(a b c d e f)) D 9. Break [10]> (nth 0 '(a b c)) A 9. Break [10]> (nth 3 '(a b c)) NIL 9. Break [10]> (equal 1 1) T 9. Break [10]> (equal 1 2) NIL 9. Break [10]> (equal '(b c) '(b c)) T 9. Break [10]> (equal 'a (car '(a b c))) T 9. Break [10]> (set 'x 3) 3 9. Break [10]> (set 'y 2) 2 9. Break [10]> (cond ((euqal x y) (print x) (+ x y)) (t (print x) (print y) (- x y))) *** - EVAL: the function EUQAL is undefined 10. Break [11]> (cond ((equal x y) (print x) (+ x y)) (t (print x) (print y) (- x y))) 3 2 1 10. Break [11]> ;; Dribble started 2005-01-09 11:55:58 # 5. Break [9]> (defun filter_negatives (number-list) (cond ((null number-list) nil) ((plusp (car number-list)) (cons (car number-list) )))) FILTER_NEGATIVES 5. Break [9]> )) *** - READ from # #>: an object cannot start with #\) 6. Break [10]> (defun reverse_list(input_list) (cond ((null input_list) nill); termination (cond ((null input_list) nill); termination)))))))) )) ) *** - SYSTEM::%EXPAND-FORM: (NULL INPUT_LIST) should be a lambda expression 7. Break [11]> (defun reverse_list(input_list) (cond ((null number-list) nil)) (set 'new_list (car (input_list))) (set 'input_list (cdr (input_list))) (new_list)) REVERSE_LIST 7. Break [11]> reverse_list'((reverse) (this) (list)) *** - EVAL: variable REVERSE_LIST has no value 8. Break [12]> reverse_list'(reverse this list) *** - EVAL: variable REVERSE_LIST has no value 9. Break [13]> (defun reverse_list(input_list) (cond ((null input_list) nil)) (set 'new_list (car (input_list))) (set 'input_list (cdr (input_list))) (new_list)) REVERSE_LIST 9. Break [13]> (reverse_list '(1 2 3 4 5)) *** - EVAL: the function INPUT_LIST is undefined 10. Break [14]> (reverse_list '((1) (2) (3) (4) (5))) *** - EVAL: the function INPUT_LIST is undefined 11. Break [15]> (defun setcheck(input_list)) SETCHECK 11. Break [15]> (defun setcheck(input_list) (set 'input_list (car(input_list)))) SETCHECK 11. Break [15]> (setcheck'(1 2)) *** - EVAL: the function INPUT_LIST is undefined 12. Break [16]> (defun setcheck(input_list) (car(input_list))) SETCHECK 12. Break [16]> (setcheck'(1 2)) *** - EVAL: the function INPUT_LIST is undefined 13. Break [17]> (setcheck '(1 2)) *** - EVAL: the function INPUT_LIST is undefined 14. Break [18]> (setcheck (1 2)) *** - EVAL: 1 is not a function name 15. Break [19]> (setcheck '(1 2)) *** - EVAL: the function INPUT_LIST is undefined 16. Break [20]> (defun setcheck(input_list) (car'(input_list))) SETCHECK 16. Break [20]> (setcheck '(1 2)) INPUT_LIST 16. Break [20]> (defun setcheck(input_list) (car input_list)) SETCHECK 16. Break [20]> (setcheck '(1 2)) 1 16. Break [20]> (defun reverse_list(input_list) (cond ((null input_list) nil) (set new_list (car input_list)) (set input_list (cdr input_list)) ) ) REVERSE_LIST 16. Break [20]> (reverse list '(1 2 3)) *** - EVAL: variable LIST has no value 17. Break [21]> (reverse_list '(1 2 3)) *** - EVAL: variable SET has no value 18. Break [22]> ;; Dribble started 2005-01-08 21:30:08 #< *** - READ from #>: objects printed as #<...> cannot be read back in 19. Break [23]> OUTPUT BUFFERED FILE-STREAM CHARACTER #P"file4.out" @1> *** - EVAL: variable OUTPUT has no value 20. Break [24]> (defun reverse_list(input_list)) REVERSE_LIST 20. Break [24]> (defun reverse_list(input_list) (cond ((null input_list) nil)) (set 'new_list (cons 'first_list 'new_list)) (set 'first_list (car input_list)) (set 'input_list (cdr input_list))) REVERSE_LIST 20. Break [24]> (REVERSE_LIST '(1 2 3)) (2 3) 20. Break [24]> (defun reverse_list(input_list) (cond ((null input_list) nil)) (set 'new_list (cons 'first_list 'new_list)) (set 'first_list (car input_list)) (set 'input_list (cdr input_list)) (new_list)) REVERSE_LIST 20. Break [24]> (REVERSE_LIST '(1 2 3)) *** - EVAL: the function NEW_LIST is undefined 21. Break [25]> (defun reverse_list(input_list) (cond ((null input_list) nil)) (set 'new_list (cons 'first_list 'new_list)) (set 'first_list (car input_list)) (set 'input_list (cdr input_list))) REVERSE_LIST 21. Break [25]> (defun reverse_list(input_list) (cond ((null input_list) nil)) (set 'new_list (cons 'first_list 'new_list)) (set 'first_list (car input_list)) (set 'input_list (cdr input_list)) (reverse_list(input_list)) (new_list)) REVERSE_LIST 21. Break [25]> (REVERSE_LIST '(1 2 3)) *** - EVAL: the function INPUT_LIST is undefined 22. Break [26]> (defun reverse_list(input_list) (cond ((null input_list) nil)) (set 'new_list (cons 'first_list 'new_list)) (set 'first_list (car input_list)) (set 'input_list (cdr input_list)) (reverse_list'(input_list)) (new_list)) REVERSE_LIST 22. Break [26]> (REVERSE_LIST '(1 2 3)) 22. Break [26]> (defun reverse_list(input_list) (cond ((null input_list) nil)) (set 'new_list (cons 'first_list 'new_list)) (set 'first_list (car input_list)) (reverse_list((cdr input_list))) ) *** - SYSTEM::%EXPAND-FORM: (CDR INPUT_LIST) should be a lambda expression 23. Break [27]> (reverse_list '(1 2 3)) *** - EVAL: the function REVERSE_LIST is undefined 24. Break [28]> ;; Dribble started 2005-01-09 17:07:31 # [2]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (car my_list)) (t (copy_list (cdr my_list))))) COPY_LIST [3]> (copy_list '((1 2) 1 2 3 4)) (1 2) [4]> (copy_list'(1 3 5 2) ) NIL [5]> (copy_list '((1 2) nil (3 4) 2 6)) (1 2) [6]> (copy_list '((3 4) 2 6)) (3 4) [7]> (copy_list '(8 (3 4) 2 6)) (3 4) [8]> (quit) Bye. ;; Dribble started 2005-01-09 17:10:13 # [2]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (car my_list)) (t (copy_list (cdr my_list))))) COPY_LIST [3]> (copy_list '((1 2) 1 2 3 4)) (1 2) [4]> (copy_list '(1 2 3 4)) NIL [5]> (copy_list '(1 2 3 (3 4) 8)) (3 4) [6]> (copy_list '(1 2 3 (3 4) 8 (6 2) 11)) (3 4) [7]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (car my_list)) (t (cons (copy_list((car my_list))(copy_list (cdr my_list))))) ) ) *** - SYSTEM::%EXPAND-FORM: (CAR MY_LIST) should be a lambda expression 1. Break [8]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (car my_list)) (t (cons (copy_list (car mylist))) (copy_list (cdr my_list))))) COPY_LIST 1. Break [8]> (copy_list '(1 2 3 (3 4) 8 (6 2) 11)) *** - EVAL: variable MYLIST has no value 2. Break [9]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (car my_list)) (t (cons (copy_list(car my_list))) (copy_list (cdr my_list))))) COPY_LIST 2. Break [9]> (copy_list '(1 2 3 (3 4) 8 (6 2) 11)) *** - CAR: 1 is not a list 3. Break [10]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (car my_list) (cons (copy_list(car my_list)))) (t (copy_list (cdr my_list))))) COPY_LIST 3. Break [10]> (copy_list '(1 2 3 (3 4) 8 (6 2) 11)) *** - EVAL: too few arguments given to CONS: (CONS (COPY_LIST (CAR MY_LIST))) 4. Break [11]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (cons (copy_list(car my_list)))) (t (copy_list (cdr my_list))))) COPY_LIST 4. Break [11]> (copy_list '(1 2 3 (3 4) 8 (6 2) 11)) *** - EVAL: too few arguments given to CONS: (CONS (COPY_LIST (CAR MY_LIST))) 5. Break [12]> (defun copyx(s) (cond ((atom s) s) (t (cons (copyx(car s)) (copyx(cdr(s)))))) ) COPYX 5. Break [12]> copys '(4 5 6 7) *** - EVAL: variable COPYS has no value 6. Break [13]> (defun copyx(s) (cond ((atom s) s) (t (cons (copyx(car s)))) (copyx(cdr(s))))) COPYX 6. Break [13]> ) *** - READ from # #>: an object cannot start with #\) 7. Break [14]> (copyx '(1 2 3 4)) *** - EVAL: too few arguments given to CONS: (CONS (COPYX (CAR S))) 8. Break [15]> (defun copyx(s) (cond ((atom s) s) (t (cons copyx(car s))) (copyx(cdr(s))))) COPYX 8. Break [15]> ) *** - READ from # #>: an object cannot start with #\) 9. Break [16]> (defun filter-even (number-list) (cond ((null number-list) nil) ((oddp (car number-list)) (cons (car number-list) (filter-evens (cdr number-list)))) (t (filter-evens (cdr number-list))))) FILTER-EVEN 9. Break [16]> (filter-even '(1 2 3 4)) *** - EVAL: the function FILTER-EVENS is undefined 10. Break [17]> (defun filter-even (number-list) (cond ((null number-list) nil) ((oddp (car number-list)) (cons (car number-list) (filter-even (cdr number-list)))) (t (filter-evens (cdr number-list))))) FILTER-EVEN 10. Break [17]> (copyx '(1 2 3 4)) *** - EVAL: variable COPYX has no value 11. Break [18]> (filter-even '(1 2 3 4)) *** - EVAL: the function FILTER-EVENS is undefined 12. Break [19]> (defun filter-even (number-list) (cond ((null number-list) nil) ((oddp (car number-list)) (cons (car number-list) (filter-even (cdr number-list)))) (t (filter-even (cdr number-list))))) FILTER-EVEN 12. Break [19]> (filter-even '(1 2 3 4)) (1 3) 12. Break [19]> (defun copy_list(input-list) (cond ((null input-list) nil) ((not(atom (car input-list))) (cons (car input-list) (copy_list (cdr input-list)))) (t (copy_list (cdr input-list))))) COPY_LIST 12. Break [19]> (copyx '(1 2 (6 3) 3 4)) *** - EVAL: variable COPYX has no value 13. Break [20]> (copy_list '(1 2 (6 3) 3 4)) ((6 3)) 13. Break [20]> (copy_list '(1 2 (6 3) 3 (8 4) 4)) ((6 3) (8 4)) 13. Break [20]> (copy_list '(1 2 6 3 3 8 4 4)) NIL 13. Break [20]> (quit) Bye. ;; Dribble started 2005-01-09 15:55:19 # [2]> (defun copy_non_atoms(list_in) (cond ((null list_in) "empty input") ((atom list_in) "copied" (car input_in)) (t (push (car input_in) new_list) (copy_non_atoms(cdr list_in))) ) ) COPY_NON_ATOMS [3]> (copy_non_atoms '((2 3) 4 5) ) *** - EVAL: variable INPUT_IN has no value 1. Break [4]> (copy_non_atoms '(4 5)) *** - EVAL: variable INPUT_IN has no value 2. Break [5]> (defun copy_non_atoms(list_in) (cond ((null list_in) "empty input") ((atom list_in) "atom) (copy_non_atoms(cdr list_in))) )) ) ) ) ))))))) (quit) *** - SYSTEM::STRING-READER: Ctrl-C: User break 3. Break [6]> (quit) Bye. ;; Dribble started 2005-01-09 16:08:10 # [2]> (defun copy_items(input_list) (cond ((atom (car input_list) "atom")) (copy_items(cdr input_list)))) COPY_ITEMS [3]> (copy_items '(1 2)) *** - EVAL: too many arguments given to ATOM: (ATOM (CAR INPUT_LIST) "atom") 1. Break [4]> (setq test (1 2 3)) *** - EVAL: 1 is not a function name 2. Break [5]> (set test (1 2 3)) *** - EVAL: variable TEST has no value 3. Break [6]> (set 'test (1 2 3)) *** - EVAL: 1 is not a function name 4. Break [7]> (set 'test '(1 2 3)) (1 2 3) 4. Break [7]> (atom (car 'test)) *** - CAR: TEST is not a list 5. Break [8]> (atom (car test)) T 5. Break [8]> (defun copy_items(input_list) (cond ((atom (car input_list)) "atom") (copy_items(cdr input_list)))) COPY_ITEMS 5. Break [8]> (copy_items '(1 2)) "atom" 5. Break [8]> (defun copy_items(input_list) (cond ((null input_list) nil) ((atom (car input_list)) "atom") (t (copy_items(cdr input_list))))) COPY_ITEMS 5. Break [8]> (copy_items '(1 2 3)) "atom" 5. Break [8]> (copy_items '((1 2) 1 2 3)) "atom" 5. Break [8]> (defun copy_items(input_list) (cond ((null input_list) nil) ((atom (car input_list)) "atom") (t "ok" (copy_items(cdr input_list))))) COPY_ITEMS 5. Break [8]> (copy_items '((1 2) 1 2 3)) "atom" 5. Break [8]> (defun copy_items(input_list) (cond ((null input_list) nil) ((atom (car input_list)) "atom") ((list (car input_list)) "list") (t "ok" (copy_items(cdr input_list))))) COPY_ITEMS 5. Break [8]> (copy_items '((1 2) 1 2 3)) "list" 5. Break [8]> (copy_items '(1 2 3)) "atom" 5. Break [8]> (copy_items '(1 2 (1 2)) ) "atom" 5. Break [8]> (defun copy_items(input_list) (cond ((null input_list) nil) ((atom (car input_list)) "atom") ((list (car input_list)) "list") (t (copy_items(cdr input_list))))) COPY_ITEMS 5. Break [8]> (copy_items '(1 2 (1 2)) ) "atom" 5. Break [8]> (defun my-length (my_list) (cond ((null my_list) 0) (t (+ (my-length (cdr my_list)) 1)))) MY-LENGTH 5. Break [8]> (my_length '(1 2 3 4)) *** - EVAL: the function MY_LENGTH is undefined 6. Break [9]> (my-length '(1 2 3 4)) 4 6. Break [9]> (defun copy_list (my_list) (cond ((null my_list) "empty") (t (+ (copy_list (cdr my_list)) 1)))) COPY_LIST 6. Break [9]> (copy_list '(1 2 3 4)) *** - argument to + should be a number: "empty" 7. Break [10]> (defun copy_list (my_list) (cond ((null my_list) 0) (t (+ (copy_list (cdr my_list)) 1)))) COPY_LIST 7. Break [10]> (my-length '(1 2 3 4)) 4 7. Break [10]> (defun copy_list (my_list) (cond ((null my_list) nil) (t (+ (copy_list (cdr my_list)) 1)))) COPY_LIST 7. Break [10]> (copy_list '(1 2 3 4)) *** - argument to + should be a number: NIL 8. Break [11]> (defun copy_list (my_list) (cond ((null my_list) 0) (t (+ (copy_list (cdr my_list)) 1)))) COPY_LIST 8. Break [11]> (copy_list '(1 2 3 4)) 4 8. Break [11]> (defun copy_list (my_list) (cond ((atom (car my_list)) 0) (t (+ (copy_list (cdr my_list)) 1)))) COPY_LIST 8. Break [11]> (copy_list '(1 2 3 4)) 0 8. Break [11]> (defun copy_list (my_list) (cond ((list (car my_list)) 0) (t (+ (copy_list (cdr my_list)) 1)))) COPY_LIST 8. Break [11]> (copy_list '(1 2 3 4)) 0 8. Break [11]> (defun copy_list (my_list) (cond ((null my_list) 0) ((atom (car my_list)) 0) (t (+ (copy_list (cdr my_list)) 1)))) COPY_LIST 8. Break [11]> (copy_list '(1 2 3 4)) 0 8. Break [11]> (defun copy_list (my_list) (cond ((null my_list) 0) (cond ((atom (car my_list)) 2) (t (+ (copy_list (cdr my_list)) 1)))) ) *** - SYSTEM::%EXPAND-FORM: (ATOM (CAR MY_LIST)) should be a lambda expression 9. Break [12]> (copy_list '(1 2 3 4)) *** - EVAL: the function COPY_LIST is undefined 10. Break [13]> (defun copy_list (my_list) (cond ((null my_list) 0) (cond ((atom my_list) my_list) (t (+ (copy_list (cdr my_list)) 1)))) ) *** - SYSTEM::%EXPAND-FORM: (ATOM MY_LIST) should be a lambda expression 11. Break [14]> (defun copy_list (my_list) (cond ((null my_list) 0) ((atom my_list) my_list) (t (+ (copy_list (cdr my_list)) 1)))) COPY_LIST 11. Break [14]> (copy_list '(1 2 3 4)) 4 11. Break [14]> (defun copy_list (my_list) (cond ((null my_list) 0) ((atom my_list) (pop my_list)) (t (+ (copy_list (cdr my_list)) 1)))) COPY_LIST 11. Break [14]> (copy_list '(1 2 3 4)) 4 11. Break [14]> (defun copy_list (my_list) (cond ((null my_list) 0) ((atom my_list) (pop my_list)) (t (copy_list (cdr my_list))))) COPY_LIST 11. Break [14]> (copy_list '(1 2 3 4)) 0 11. Break [14]> (copy_list '(1 (1 2) 2 3 4)) 0 11. Break [14]> (defun copy_list (my_list) (cond ((null my_list) 0) ((atom my_list) (pop my_list)) (t (copy_list (cdr my_list))))) COPY_LIST 11. Break [14]> (copy_list '(1 4) (1 2)) *** - EVAL: 1 is not a function name 12. Break [15]> (copy_list '((1 4) (1 2))) 0 12. Break [15]> (defun copy_list (my_list) (cond ((null my_list) 0) ((atom my_list) (pop my_list)) (t (copy_list (cdr my_list))))) COPY_LIST 12. Break [15]> (defun copy_list (my_list) (cond ((null my_list) 0) ((atom my_list) (pop my_list)) my_list (t (copy_list (cdr my_list))))) *** - code contains a dotted list, ending with MY_LIST 13. Break [16]> (defun copy_list (my_list) (cond ((null my_list) nil) ((atom (car my_list)) (pop my_list)) ((atom my_list) (pop my_list)) ) ) COPY_LIST 13. Break [16]> )) *** - READ from # #>: an object cannot start with #\) 14. Break [17]> (defun copy_list (my_list) (cond ((null my_list) nil) ((atom (car my_list)) (pop my_list)) ((atom my_list) (pop my_list)) (defun copy_list (my_list) ))) COPY_LIST 14. Break [17]> ))))) *** - READ from # #>: an object cannot start with #\) 15. Break [18]> (defun copy_list (my_list) (cond ((null my_list) nil) ((atom (car my_list)) (pop my_list)) (t (copy_list (cdr my_list))))) COPY_LIST 15. Break [18]> (copy_list '((1 4) (1 2))) NIL 15. Break [18]> (copy_list '(1 2 3 4) ) 1 15. Break [18]> (defun copy_list (my_list) (cond ((null my_list) nil) ((atom (car my_list)) 2) (t (copy_list (cdr my_list))))) COPY_LIST 15. Break [18]> (copy_list '((1 4) (1 2))) NIL 15. Break [18]> (copy_list '(1 2 3 4)) 2 15. Break [18]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((atom (car my_list)) 2) (t (copy_list (cdr my_list))))) COPY_LIST 15. Break [18]> (copy_list '(1 2 3 4) ) 2 15. Break [18]> (copy_list '((1 2) 1 2 3 4)) 2 15. Break [18]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((atom (car my_list)) 2) (t (copy_list (cdr my_list))) ) my_list) COPY_LIST 15. Break [18]> (copy_list '((1 2) 1 2 3 4)) ((1 2) 1 2 3 4) 15. Break [18]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((atom (car my_list)) 2) (t (copy_list (cdr my_list))) ) my_list) COPY_LIST 15. Break [18]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((atom (car my_list)) (pop my_list)) (t (copy_list (cdr my_list)))) my_list) COPY_LIST 15. Break [18]> (copy_list '((1 2) 1 2 3 4)) ((1 2) 1 2 3 4) 15. Break [18]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) push new_list) (t (copy_list (cdr my_list)))) new_list) COPY_LIST 15. Break [18]> (copy_list '((1 2) 1 2 3 4)) *** - EVAL: variable PUSH has no value 16. Break [19]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (push new_list)) (t (copy_list (cdr my_list)))) new_list) *** - The macro PUSH may not be called with 1 arguments: (PUSH NEW_LIST) 17. Break [20]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (push (car my_list) new_list)) (t (copy_list (cdr my_list)))) new_list) COPY_LIST 17. Break [20]> (copy_list '((1 2) 1 2 3 4)) *** - EVAL: variable NEW_LIST has no value 18. Break [21]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (my_list))) (push my_list new_list)) (t (copy_list (cdr my_list)))) new_list) COPY_LIST 18. Break [21]> (copy_list '((1 2) 1 2 3 4)) *** - EVAL: the function MY_LIST is undefined 19. Break [22]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) 2) (t (copy_list (cdr my_list)))) my_list) COPY_LIST 19. Break [22]> (copy_list '((1 2) 1 2 3 4)) ((1 2) 1 2 3 4) 19. Break [22]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) 2) (t (copy_list (cdr my_list))))) COPY_LIST 19. Break [22]> (copy_list '((1 2) 1 2 3 4)) 2 19. Break [22]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (car my_list)) (t (copy_list (cdr my_list))))) COPY_LIST 19. Break [22]> (copy_list '((1 2) 1 2 3 4)) (1 2) 19. Break [22]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) push (car my_list) new_list) (t (copy_list (cdr my_list)))) new_list) COPY_LIST 19. Break [22]> (copy_list '((1 2) 1 2 3 4)) *** - EVAL: variable PUSH has no value 20. Break [23]> (defun copy_list (my_list) (cond ((null my_list) my_list) ((not(atom (car my_list))) (push (car my_list) new_list)) (t (copy_list (cdr my_list)))) new_list) COPY_LIST 20. Break [23]> (copy_list '((1 2) 1 2 3 4)) *** - EVAL: variable NEW_LIST has no value 21. Break [24]> (quit) Bye.