dribbling to file "sept4.dribble" NIL CL-USER(2): (/ 1 2) 1/2 CL-USER(3): CL-USER(3): CL-USER(3): CL-USER(3): CL-USER(3): CL-USER(3): CL-USER(3): 1/3 1/3 CL-USER(4): (float 1/3) 0.33333334 CL-USER(5): (eval 1/3) 1/3 CL-USER(6): 2/6 1/3 CL-USER(7): 10/3 10/3 CL-USER(8): (+ 1/3 5/6) 7/6 CL-USER(9): (defun one (x) (dotimes (i (length x)) (print (+ 1 (nth i x))))) ONE CL-USER(10): (one '(1 2 3)) 2 3 4 NIL CL-USER(11): (defun two (x) (dolist (xi x) (print (+ 1 xi)))) TWO CL-USER(12): (two '(1 2 3)) 2 3 4 NIL CL-USER(13): (two '(1 (2 4) 3)) 2 Error: `(2 4)' is not of the expected type `NUMBER' [condition type: TYPE-ERROR] Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart) 1: Abort # [1] CL-USER(14): :pop CL-USER(15): (defun three (x) (do ((i 0 (+ i 1))) ((= i (length x))) (print (+ (nth i x) 1)))) THREE CL-USER(16): (three '(20 23 35)) 21 24 36 NIL CL-USER(17): (defun three (x) (do ((xi (first x) (rest x))) ((null xi)) (print (+ 1 xi)))) THREE CL-USER(18): (three '(10 12 )) 11 Error: `(12)' is not of the expected type `NUMBER' [condition type: TYPE-ERROR] Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart) 1: Abort # [1] CL-USER(19): :pop CL-USER(20): (defun three (x) (do ((xi (first x) (rest x))) ((null xi)) (print (list 'xi xi)) (print (+ 1 xi)))) THREE CL-USER(21): (three '(10 12 )) (XI 10) 11 (XI (12)) Error: `(12)' is not of the expected type `NUMBER' [condition type: TYPE-ERROR] Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart) 1: Abort # [1] CL-USER(22): :pop CL-USER(23): (defun three (x) (do ((xi x (rest x))) ((null xi)) (print (list 'xi xi)) (print (+ 1 xi)))) THREE CL-USER(24): (three '(10 12 )) (XI (10 12)) Error: `(10 12)' is not of the expected type `NUMBER' [condition type: TYPE-ERROR] Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart) 1: Abort # [1] CL-USER(25): :pop CL-USER(26): (defun three (x) (do ((xi x (rest x))) ((null xi)) (print (list 'xi xi)) (print (+ 1 (first xi))))) THREE CL-USER(27): (three '(10 12 )) (XI (10 12)) 11 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 (XI (12)) 13 13 (XI (12)) 13 (XI (12)) Error: Received signal number 2 (Keyboard interrupt) [condition type: INTERRUPT-SIGNAL] Restart actions (select using :continue): 0: continue computation 1: Return to Top Level (an "abort" restart) 2: Abort # [1c] CL-USER(28): :pop CL-USER(29): (three '(10 12 13 14 15)) (XI (10 12 13 14 15)) 11 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) 13 (XI (12 13 14 15)) Error: Received signal number 2 (Keyboard interrupt) [condition type: INTERRUPT-SIGNAL] Restart actions (select using :continue): 0: continue computation 1: Return to Top Level (an "abort" restart) 2: Abort # [1c] CL-USER(30): :pop CL-USER(31): (defun three (x) (do ((xi x (rest xi))) ((null xi)) (print (list 'xi xi)) (print (+ 1 (first xi))))) THREE CL-USER(32): (three '(10 12 13 14 15)) (XI (10 12 13 14 15)) 11 (XI (12 13 14 15)) 13 (XI (13 14 15)) 14 (XI (14 15)) 15 (XI (15)) 16 NIL CL-USER(33): (defun three (x) (do ((xi x (rest xi))) ((null xi)) ;(print (list 'xi xi)) (print (+ 1 (first xi))))) THREE CL-USER(34): (three '(10 12 13 14 15)) 11 13 14 15 16 NIL CL-USER(35): (mapcar #'print '(1 2 3)) 1 2 3 (1 2 3) CL-USER(36): (- 4) -4 CL-USER(37): (- 5 1) 4 CL-USER(38): (mapcar #'- '(1 2 3)) (-1 -2 -3) CL-USER(39): (defun two (x) (let ((result nil)) (dolist (xi x) (setf result (append result (+ 1 xi)))) result)) TWO CL-USER(40): (setf x '( 1 2)) (1 2) CL-USER(41): (append x '( 4)) (1 2 4) CL-USER(42): (append x '( 5)) (1 2 5) CL-USER(43): (setf x (append x '( 4))) (1 2 4) CL-USER(44): (setf x (append x '(5))) (1 2 4 5) CL-USER(45): (setf x (append x '(6))) (1 2 4 5 6) CL-USER(46): (setf x (append x 7)) (1 2 4 5 6 . 7) CL-USER(47): x (1 2 4 5 6 . 7) CL-USER(48): (sdraw x) [*|*]--->[*|*]--->[*|*]--->[*|*]--->[*|*]--->7 | | | | | v v v v v 1 2 4 5 6 CL-USER(49): (setf x (append x '(8))) (1 2 4 5 6 8) CL-USER(50): (sdraw x) [*|*]--->[*|*]--->[*|*]--->[*|*]--->[*|*]--->[*|*]--->NIL | | | | | | v v v v v v 1 2 4 5 6 8 CL-USER(51): (defun two (x) (let ((result nil)) (dolist (xi x) (setf result (append result (+ 1 xi)))) result)) TWO CL-USER(52): (two '(1 2 3)) Error: `2' is not of the expected type `LIST' [condition type: TYPE-ERROR] Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart) 1: Abort # [1] CL-USER(53): result Error: Attempt to take the value of the unbound variable `RESULT'. [condition type: UNBOUND-VARIABLE] Restart actions (select using :continue): 0: Try evaluating RESULT again. 1: Use :RESULT instead. 2: Set the symbol-value of RESULT and use its value. 3: Use a value without setting RESULT. 4: Return to Debug Level 1 (an "abort" restart) 5: Return to Top Level (an "abort" restart) 6: Abort # [2] CL-USER(54): :pop Previous error: `2' is not of the expected type `LIST' [1] CL-USER(55): :pop CL-USER(56): (append nil 2) 2 CL-USER(57): (defun two (x) (let ((result nil)) (dolist (xi x) (setf result (append result (list (+ 1 xi))))) result)) TWO CL-USER(58): '(+ 2 1) (+ 2 1) CL-USER(59): (eval '(+ 2 1)) 3 CL-USER(60): (list (+ 2 1)) (3) CL-USER(61): (cons (+ 2 1) nil) (3) CL-USER(62): (defun two (x) (let ((result nil)) (dolist (xi x) (setf result (append result (list (+ 1 xi))))) result)) TWO CL-USER(63): (two '(1 2 3)) (2 3 4) CL-USER(64): (mapcar #'+ '(1 2 3)) (1 2 3) CL-USER(65): (+ 1) 1 CL-USER(66): (+ -1) -1 CL-USER(67): (+ -1 0) -1 CL-USER(68): (defun add1 (x) (+ x 1)) ADD1 CL-USER(69): (add1 4) 5 CL-USER(70): (mapcar #'add1 '(1 2 3)) (2 3 4) CL-USER(71): (mapcar #'(lambda (x) (+ 1 x)) '(1 2 3)) (2 3 4) CL-USER(72): (mapcar #'((x) (+ 1 x)) '(1 2 3)) Error: `((X) (+ 1 X))' is not fbound [condition type: UNDEFINED-FUNCTION] Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart) 1: Abort # [1] CL-USER(73): :pop CL-USER(74): (mapcar #'(lambda (x) (* 2 x)) '(1 2 3)) (2 4 6) CL-USER(75): (mapcar #'(lambda (x y) (+ x y)) '(1 2 3) '(10 20 30)) (11 22 33) CL-USER(76): (mapcar #'+ '(1 2 3) '(10 20 30)) (11 22 33) CL-USER(77): (mapcar #'+ '(1 2 3) '(10 20 30) '( 1 3 5) '( 2 4 5)) (14 29 43) CL-USER(78): (mapcar #'(lambda (x y) (+ x y)) '(1 2 3) '(10 20 30)) (11 22 33) CL-USER(79): (mapcar #'(lambda (x y) (+ x y)) '( 1 2 3) '(3 5 6)) (4 7 9) CL-USER(80): (defun two (x) (let ((result nil)) (dolist (xi x) (setf result (append result (list (+ 1 xi))))) result)) TWO CL-USER(81): (defun four (x) (print (car x))) FOUR CL-USER(82): (four '( 1 2 3)) 1 1 CL-USER(83): (defun four (x) (print (car x)) (four (cdr x))) FOUR CL-USER(84): (four '( 1 2 3)) 1 2 3 NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL Error: Received signal number 2 (Keyboard interrupt) [condition type: INTERRUPT-SIGNAL] Restart actions (select using :continue): 0: continue computation 1: Return to Top Level (an "abort" restart) 2: Abort # [1c] CL-USER(85): Error: Received signal number 2 (Keyboard interrupt) [condition type: INTERRUPT-SIGNAL] Restart actions (select using :continue): 0: continue computation at break level 1 1: continue computation 2: Return to Top Level (an "abort" restart) 3: Abort # [2c] CL-USER(86): Error: Received signal number 2 (Keyboard interrupt) [condition type: INTERRUPT-SIGNAL] Restart actions (select using :continue): 0: continue computation at break level 2 1: continue computation at break level 1 2: continue computation 3: Return to Top Level (an "abort" restart) 4: Abort # [3c] CL-USER(87): Error: Received signal number 2 (Keyboard interrupt) [condition type: INTERRUPT-SIGNAL] Restart actions (select using :continue): 0: continue computation at break level 3 1: continue computation at break level 2 2: continue computation at break level 1 3: continue computation 4: Return to Top Level (an "abort" restart) 5: Abort # [4c] CL-USER(88): Error: Received signal number 2 (Keyboard interrupt) [condition type: INTERRUPT-SIGNAL] Restart actions (select using :continue): 0: continue computation at break level 4 1: continue computation at break level 3 2: continue computation at break level 2 3: continue computation at break level 1 4: continue computation 5: Return to Top Level (an "abort" restart) 6: Abort # [5c] CL-USER(89): :pop Previous error: Received signal number 2 (Keyboard interrupt) If continued, continue computation at break level 3 [4c] CL-USER(90): :reset CL-USER(91): (defun four (x) (if (not (null x)) (progn (print (car x)) (four (cdr x))))) FOUR CL-USER(92): (four '(1 2 3)) 1 2 3 NIL CL-USER(93): (defun four (x) (if (not (null x)) (progn (print (+ 1 (car x))) (four (cdr x))))) FOUR CL-USER(94): (four '(1 2 3)) 2 3 4 NIL CL-USER(95): (progn 1 2 3 4 5) 5 CL-USER(96): (progn (setf x 3) (setf x (+ x 3)) x) 6 CL-USER(97): (prog1 1 2 3 4 5) 1 CL-USER(98): (prog2 1 2 3 4) 2 CL-USER(99): (setf stk nil) NIL CL-USER(100): stk NIL CL-USER(101): (push stk 1) Error: 1 illegal atomic form for get-setf-expansion. [condition type: PROGRAM-ERROR] Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart) 1: Abort # [1] CL-USER(102): :pop CL-USER(103): (push 1 stk) (1) CL-USER(104): stk (1) CL-USER(105): (push 1 stk) (1 1) CL-USER(106): (push 1 stk) (1 1 1) CL-USER(107): (push 1 stk) (1 1 1 1) CL-USER(108): (push 1 stk) (1 1 1 1 1) CL-USER(109): (push 2 stk) (2 1 1 1 1 1) CL-USER(110): (pop stk) 2 CL-USER(111): stk (1 1 1 1 1) CL-USER(112): (sdraw stk) [*|*]--->[*|*]--->[*|*]--->[*|*]--->[*|*]--->NIL | | | | | v v v v v 1 1 1 1 1 CL-USER(113): (car stk) 1 CL-USER(114): (push 'z newone) Error: Attempt to take the value of the unbound variable `NEWONE'. [condition type: UNBOUND-VARIABLE] Restart actions (select using :continue): 0: Try evaluating NEWONE again. 1: Set the symbol-value of NEWONE and use its value. 2: Use a value without setting NEWONE. 3: Return to Top Level (an "abort" restart) 4: Abort # [1] CL-USER(115): :pop CL-USER(116): (setf newone '()) NIL CL-USER(117): '() NIL CL-USER(118): nil NIL CL-USER(119): (setf another (push 5 another)) Error: Attempt to take the value of the unbound variable `ANOTHER'. [condition type: UNBOUND-VARIABLE] Restart actions (select using :continue): 0: Try evaluating ANOTHER again. 1: Set the symbol-value of ANOTHER and use its value. 2: Use a value without setting ANOTHER. 3: Return to Top Level (an "abort" restart) 4: Abort # [1] CL-USER(120): :pop CL-USER(121): (defun postfix (exp) (let ((stack nil)) (dolist (term exp) (print exp)))) POSTFIX CL-USER(122): (postfix '(1 2 +)) (1 2 +) (1 2 +) (1 2 +) NIL CL-USER(123): (defun postfix (exp) (let ((stack nil)) (dolist (term exp) (print term)))) POSTFIX CL-USER(124): (postfix '(1 2 +)) 1 2 + NIL CL-USER(125): (defun postfix (exp) (let ((stack nil)) (dolist (term exp) (if (numberp term) (push term stack) ;;else (let* ((arg2 (pop stack)) (arg1 (pop stack))) (cond ((eql term '+) (push (+ arg1 arg2) stack)) ((eql term '-) (push (- arg1 arg2) stack)) ((eql term '*) (push (* arg1 arg2) stack)) ((eql term '/) (push (/ arg1 arg2) stack)) (t 'error))))) (pop stack))) POSTFIX CL-USER(126): (postfix '(2 1 +)) 3 CL-USER(127): (postfix '(2 1 + 4 *)) 12 CL-USER(128): (setf term '+) + CL-USER(129): 'term TERM CL-USER(130): (funcall term 1 2) 3 CL-USER(131): (funcall #'+ 1 2) 3 CL-USER(132): (defun postfix (exp) (let ((stack nil)) (dolist (term exp) (if (numberp term) (push term stack) ;;else (let* ((arg2 (pop stack)) (arg1 (pop stack))) (push (funcall term arg1 arg2) stack)))) (pop stack))) POSTFIX CL-USER(133): (postfix '(2 1 + 4 *)) 12 CL-USER(134): (setf term 'vda) VDA CL-USER(135): (funcall term 1 2) Error: attempt to call `VDA' which is an undefined function. [condition type: UNDEFINED-FUNCTION] Restart actions (select using :continue): 0: Try calling VDA again. 1: Return a value instead of calling VDA. 2: Try calling a function other than VDA. 3: Setf the symbol-function of VDA and call it again. 4: Return to Top Level (an "abort" restart) 5: Abort # [1] CL-USER(136): :pop CL-USER(137): (postfix '(2 1 print 4 *)) Error: `1' is not of the expected type `STREAM' [condition type: TYPE-ERROR] Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart) 1: Abort # [1] CL-USER(138): :pop CL-USER(139): (functionp #'+) T CL-USER(140): (functionp '+) NIL CL-USER(141): (dribble)