hw5.given_.tar_.gz

Given/part5/Output.correct

;; DribbleNoTimeStamp of #<io terminal-stream> started. BEGIN TESTING TEST-CROSS1 TEST-A-CROSS on: cross1-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-CROSS2 TEST-A-CROSS on: cross2-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-MY-EVERY testing: (my-every #'listp 'nil) value: t testing: (my-every #'listp '(1)) value: nil testing: (my-every #'listp '(1 2)) value: nil testing: (my-every #'listp '(1 2 3)) value: nil testing: (my-every #'integerp 'nil) value: t testing: (my-every #'integerp '(1)) value: t testing: (my-every #'integerp '(1 2)) value: t testing: (my-every #'integerp '(1 2 3)) value: t testing: (my-every #'integerp '(1 a 2)) value: nil testing: (my-every #'integerp '(a 1 2)) value: nil testing: (my-every #'integerp '(1 2 a)) value: nil testing: (my-every #'(lambda (a) (> a 4)) '(5 6 9)) value: t testing: (my-every #'(lambda (a) (> a 4)) '(5 6 0 9)) value: nil TEST-flatp TEST-A-FLAT on: flatp testing: (flat-fun 'nil) value: t testing: (flat-fun '(nil)) value: nil testing: (flat-fun '(1)) value: t testing: (flat-fun '(1 2)) value: t testing: (flat-fun '(1 2 3)) value: t testing: (flat-fun '(1 nil 2 nil 3)) value: nil testing: (flat-fun '(1 (2) 3)) value: nil testing: (flat-fun '((1 a b) (2) 3)) value: nil testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: nil testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((((1 nil 2 nil 3))))) value: nil testing: (flat-fun '((((((1))))))) value: nil testing: (flat-fun '((((((1)) (222 223)))))) value: nil testing: (flat-fun '((((((1 2 3 4))))))) value: nil TEST-lenLFL TEST-A-FLAT on: lenlfl testing: (flat-fun 'nil) value: 0 testing: (flat-fun '(nil)) value: 0 testing: (flat-fun '(1)) value: 1 testing: (flat-fun '(1 2)) value: 2 testing: (flat-fun '(1 2 3)) value: 3 testing: (flat-fun '(1 nil 2 nil 3)) value: 0 testing: (flat-fun '(1 (2) 3)) value: 1 testing: (flat-fun '((1 a b) (2) 3)) value: 3 testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: 2 testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: 2 testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: 4 testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: 5 testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: 10 testing: (flat-fun '((((1 nil 2 nil 3))))) value: 0 testing: (flat-fun '((((((1))))))) value: 1 testing: (flat-fun '((((((1)) (222 223)))))) value: 2 testing: (flat-fun '((((((1 2 3 4))))))) value: 4 DONE TESTING ;; DribbleNoTimeStamp of #<io terminal-stream> finished.

Given/HWDesc

# HW description file # ######### reminder to staff: do NOT edit this file by hand. # it was generated automatically. # # HW=hw5 # format: # partN numRuns # +partN redirectOutput doDiff yourOutput correctOutput statusCorrect command part1 2 +part1 false true Output.your Output.correct 0 </dev/null >/dev/null clisp -q -i ../init.lsp -x "(testOneSaveOutput 'test-part1)" +part1 false false UNUSED UNUSED 0 /bin/rm -f Output.your part2 2 +part2 false true Output.your Output.correct 0 </dev/null >/dev/null clisp -q -i ../init.lsp -x "(testOneSaveOutput 'test-part2)" +part2 false false UNUSED UNUSED 0 /bin/rm -f Output.your part3 2 +part3 false true Output.your Output.correct 0 </dev/null >/dev/null clisp -q -i ../init.lsp -x "(testOneSaveOutput 'test-part3)" +part3 false false UNUSED UNUSED 0 /bin/rm -f Output.your part4 2 +part4 false true Output.your Output.correct 0 </dev/null >/dev/null clisp -q -i ../init.lsp -x "(testOneSaveOutput 'test-part4)" +part4 false false UNUSED UNUSED 0 /bin/rm -f Output.your part5 2 +part5 false true Output.your Output.correct 0 </dev/null >/dev/null clisp -q -i ../init.lsp -x "(testOneSaveOutput 'test-part5)" +part5 false false UNUSED UNUSED 0 /bin/rm -f Output.your part6 2 +part6 false true Output.your Output.correct 0 </dev/null >/dev/null clisp -q -i ../init.lsp -x "(testOneSaveOutput 'test-part6)" +part6 false false UNUSED UNUSED 0 /bin/rm -f Output.your part7 2 +part7 false true Output.your Output.correct 0 </dev/null >/dev/null clisp -q -i ../init.lsp -x "(testOneSaveOutput 'test-part7)" +part7 false false UNUSED UNUSED 0 /bin/rm -f Output.your part8 2 +part8 false true Output.your Output.correct 0 </dev/null >/dev/null clisp -q -i ../init.lsp -x "(testOneSaveOutput 'test-part8)" +part8 false false UNUSED UNUSED 0 /bin/rm -f Output.your part9 2 +part9 false true Output.your Output.correct 0 </dev/null >/dev/null clisp -q -i ../init.lsp -x "(testOneSaveOutput 'test-part9)" +part9 false false UNUSED UNUSED 0 /bin/rm -f Output.your

Given/part9/Output.correct

;; DribbleNoTimeStamp of #<io terminal-stream> started. BEGIN TESTING TEST-CROSS1 TEST-A-CROSS on: cross1-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-CROSS2 TEST-A-CROSS on: cross2-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-MY-EVERY testing: (my-every #'listp 'nil) value: t testing: (my-every #'listp '(1)) value: nil testing: (my-every #'listp '(1 2)) value: nil testing: (my-every #'listp '(1 2 3)) value: nil testing: (my-every #'integerp 'nil) value: t testing: (my-every #'integerp '(1)) value: t testing: (my-every #'integerp '(1 2)) value: t testing: (my-every #'integerp '(1 2 3)) value: t testing: (my-every #'integerp '(1 a 2)) value: nil testing: (my-every #'integerp '(a 1 2)) value: nil testing: (my-every #'integerp '(1 2 a)) value: nil testing: (my-every #'(lambda (a) (> a 4)) '(5 6 9)) value: t testing: (my-every #'(lambda (a) (> a 4)) '(5 6 0 9)) value: nil TEST-flatp TEST-A-FLAT on: flatp testing: (flat-fun 'nil) value: t testing: (flat-fun '(nil)) value: nil testing: (flat-fun '(1)) value: t testing: (flat-fun '(1 2)) value: t testing: (flat-fun '(1 2 3)) value: t testing: (flat-fun '(1 nil 2 nil 3)) value: nil testing: (flat-fun '(1 (2) 3)) value: nil testing: (flat-fun '((1 a b) (2) 3)) value: nil testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: nil testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((((1 nil 2 nil 3))))) value: nil testing: (flat-fun '((((((1))))))) value: nil testing: (flat-fun '((((((1)) (222 223)))))) value: nil testing: (flat-fun '((((((1 2 3 4))))))) value: nil TEST-lenLFL TEST-A-FLAT on: lenlfl testing: (flat-fun 'nil) value: 0 testing: (flat-fun '(nil)) value: 0 testing: (flat-fun '(1)) value: 1 testing: (flat-fun '(1 2)) value: 2 testing: (flat-fun '(1 2 3)) value: 3 testing: (flat-fun '(1 nil 2 nil 3)) value: 0 testing: (flat-fun '(1 (2) 3)) value: 1 testing: (flat-fun '((1 a b) (2) 3)) value: 3 testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: 2 testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: 2 testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: 4 testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: 5 testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: 10 testing: (flat-fun '((((1 nil 2 nil 3))))) value: 0 testing: (flat-fun '((((((1))))))) value: 1 testing: (flat-fun '((((((1)) (222 223)))))) value: 2 testing: (flat-fun '((((((1 2 3 4))))))) value: 4 TEST-LEGALCONDP TEST-A-LATER on: legalcondp testing: (later-fun nil) value: t testing: (later-fun 3) value: t testing: (later-fun '(list 1 2 3 4)) value: t testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: t testing: (later-fun '(cond (3))) value: t testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: t testing: (later-fun '(if 3 4 (if 5 6))) value: t testing: (later-fun '(if nil 4 (if 5 6))) value: t testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: t testing: (later-fun '(cond (3 4) (5))) value: t testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: t testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: t testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: t testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: t testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: t testing: (later-fun '(* 44 (cond (3 2) (5)))) value: t testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: t testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: t testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: t testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: t testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: t testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: t testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: t TEST-REWRITE TEST-A-LATER on: rewrite testing: (later-fun nil) value: nil testing: (later-fun 3) value: 3 testing: (later-fun '(list 1 2 3 4)) value: (list 1 2 3 4) testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: (if 3 4) testing: (later-fun '(cond (3))) value: (if 3 3) testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: (if 3 4 5) testing: (later-fun '(if 3 4 (if 5 6))) value: (if 3 4 (if 5 6)) testing: (later-fun '(if nil 4 (if 5 6))) value: (if nil 4 (if 5 6)) testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: (if nil 3 (if 4 4)) testing: (later-fun '(cond (3 4) (5))) value: (if 3 4 (if 5 5)) testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: (if 3 4 (if t 5)) testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: (if (= 3 4) 11 (if t 15)) testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: (if (= 3 3) 11 (if t 15)) testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: (if (= 3 4) 11 (if (= 5 6) 12 (if t 17))) testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: (list (if (= 8 8) 'y) (if (= 8 7) 'no)) testing: (later-fun '(* 44 (cond (3 2) (5)))) value: (* 44 (if 3 2 (if 5 5))) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (* 44 (if 3 2 (if t 5))) testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: (* 44 (if nil 7 (if 10 10))) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (* 44 (if nil 7 (if t 10))) testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: (if (if 3 8 (if t 9)) 4 (if t 5)) testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: (if nil 4 (if t 5)) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (* 44 (if 3 2 (if t 5))) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (* 44 (if nil 7 (if t 10))) testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 8 (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: (if (= 8 (if nil 8 (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 7) 8 (if t 1)) (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 6) 8 (if t 1)) (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 6) 8 (if (if (+ 1 22) 3 (if t 77)) (if (+ 1 22) 3 (if t 77)))) (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: (cons (if (= 8 7) 'bad (if t 'good)) (if (= 8 7) 'nope (if t 'yup))) testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: (list (if (= 8 7) 'bad) (if (= 8 7) 'nope)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: (list (if (= 8 8) 'yes) (if (= 8 8) 'okay)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: (list (if (= 8 8) 'yes) (if (= 8 7) 'nope)) TEST-CHECK TEST-A-LATER on: check testing: (later-fun nil) value: (t nil nil) testing: (later-fun 3) value: (t 3 3) testing: (later-fun '(list 1 2 3 4)) value: (t (1 2 3 4) (1 2 3 4)) testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: (t 4 4) testing: (later-fun '(cond (3))) value: (t 3 3) testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: (t 4 4) testing: (later-fun '(if 3 4 (if 5 6))) value: (t 4 4) testing: (later-fun '(if nil 4 (if 5 6))) value: (t 6 6) testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: (t 4 4) testing: (later-fun '(cond (3 4) (5))) value: (t 4 4) testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: (t 15 15) testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: (t 11 11) testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: (t 17 17) testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: (t (y nil) (y nil)) testing: (later-fun '(* 44 (cond (3 2) (5)))) value: (t 88 88) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (t 88 88) testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: (t 440 440) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (t 440 440) testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: (t 5 5) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (t 88 88) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (t 440 440) testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: (t 5 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: (t 5 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: (t 5 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: (t (good . yup) (good . yup)) testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: (t (nil nil) (nil nil)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: (t (yes okay) (yes okay)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: (t (yes nil) (yes nil)) TEST-REWRITE-ITE TEST-A-LATER on: rewrite-ite testing: (later-fun nil) value: nil testing: (later-fun 3) value: 3 testing: (later-fun '(list 1 2 3 4)) value: (list 1 2 3 4) testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: (if 3 4) testing: (later-fun '(cond (3))) value: (if 3 3) testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: (if 3 4 5) testing: (later-fun '(if 3 4 (if 5 6))) value: (if 3 4 (if 5 6)) testing: (later-fun '(if nil 4 (if 5 6))) value: (if nil 4 (if 5 6)) testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: (if nil 3 (if 4 4)) testing: (later-fun '(cond (3 4) (5))) value: (if 3 4 (if 5 5)) testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: (if 3 4 5) testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: (if (= 3 4) 11 15) testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: (if (= 3 3) 11 15) testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: (if (= 3 4) 11 (if (= 5 6) 12 17)) testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: (list (if (= 8 8) 'y) (if (= 8 7) 'no)) testing: (later-fun '(* 44 (cond (3 2) (5)))) value: (* 44 (if 3 2 (if 5 5))) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (* 44 (if 3 2 5)) testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: (* 44 (if nil 7 (if 10 10))) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (* 44 (if nil 7 10)) testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: (if (if 3 8 9) 4 5) testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: (if nil 4 5) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (* 44 (if 3 2 5)) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (* 44 (if nil 7 10)) testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 8 9)) 4 5) testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: (if (= 8 (if nil 8 9)) 4 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 7) 8 1) 9)) 4 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 6) 8 1) 9)) 4 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 6) 8 (if (if (+ 1 22) 3 77) (if (+ 1 22) 3 77))) 9)) 4 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: (cons (if (= 8 7) 'bad 'good) (if (= 8 7) 'nope 'yup)) testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: (list (if (= 8 7) 'bad) (if (= 8 7) 'nope)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: (list (if (= 8 8) 'yes) (if (= 8 8) 'okay)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: (list (if (= 8 8) 'yes) (if (= 8 7) 'nope)) TEST-CHECK-ITE TEST-A-LATER on: check-ite testing: (later-fun nil) value: (t nil nil) testing: (later-fun 3) value: (t 3 3) testing: (later-fun '(list 1 2 3 4)) value: (t (1 2 3 4) (1 2 3 4)) testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: (t 4 4) testing: (later-fun '(cond (3))) value: (t 3 3) testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: (t 4 4) testing: (later-fun '(if 3 4 (if 5 6))) value: (t 4 4) testing: (later-fun '(if nil 4 (if 5 6))) value: (t 6 6) testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: (t 4 4) testing: (later-fun '(cond (3 4) (5))) value: (t 4 4) testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: (t 15 15) testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: (t 11 11) testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: (t 17 17) testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: (t (y nil) (y nil)) testing: (later-fun '(* 44 (cond (3 2) (5)))) value: (t 88 88) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (t 88 88) testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: (t 440 440) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (t 440 440) testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: (t 5 5) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (t 88 88) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (t 440 440) testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: (t 5 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: (t 5 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: (t 5 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: (t (good . yup) (good . yup)) testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: (t (nil nil) (nil nil)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: (t (yes okay) (yes okay)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: (t (yes nil) (yes nil)) DONE TESTING ;; DribbleNoTimeStamp of #<io terminal-stream> finished.

Given/part4/Output.correct

;; DribbleNoTimeStamp of #<io terminal-stream> started. BEGIN TESTING TEST-CROSS1 TEST-A-CROSS on: cross1-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-CROSS2 TEST-A-CROSS on: cross2-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-MY-EVERY testing: (my-every #'listp 'nil) value: t testing: (my-every #'listp '(1)) value: nil testing: (my-every #'listp '(1 2)) value: nil testing: (my-every #'listp '(1 2 3)) value: nil testing: (my-every #'integerp 'nil) value: t testing: (my-every #'integerp '(1)) value: t testing: (my-every #'integerp '(1 2)) value: t testing: (my-every #'integerp '(1 2 3)) value: t testing: (my-every #'integerp '(1 a 2)) value: nil testing: (my-every #'integerp '(a 1 2)) value: nil testing: (my-every #'integerp '(1 2 a)) value: nil testing: (my-every #'(lambda (a) (> a 4)) '(5 6 9)) value: t testing: (my-every #'(lambda (a) (> a 4)) '(5 6 0 9)) value: nil TEST-flatp TEST-A-FLAT on: flatp testing: (flat-fun 'nil) value: t testing: (flat-fun '(nil)) value: nil testing: (flat-fun '(1)) value: t testing: (flat-fun '(1 2)) value: t testing: (flat-fun '(1 2 3)) value: t testing: (flat-fun '(1 nil 2 nil 3)) value: nil testing: (flat-fun '(1 (2) 3)) value: nil testing: (flat-fun '((1 a b) (2) 3)) value: nil testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: nil testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((((1 nil 2 nil 3))))) value: nil testing: (flat-fun '((((((1))))))) value: nil testing: (flat-fun '((((((1)) (222 223)))))) value: nil testing: (flat-fun '((((((1 2 3 4))))))) value: nil DONE TESTING ;; DribbleNoTimeStamp of #<io terminal-stream> finished.

Given/part2/Output.correct

;; DribbleNoTimeStamp of #<io terminal-stream> started. BEGIN TESTING TEST-CROSS1 TEST-A-CROSS on: cross1-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-CROSS2 TEST-A-CROSS on: cross2-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) DONE TESTING ;; DribbleNoTimeStamp of #<io terminal-stream> finished.

Given/test.l

; LISP test file ; ;;;;;;;;; reminder to staff: do NOT edit this file by hand. ; it was generated automatically. ; ; for a specific part, to test everything interactively: ; -- enter clisp: ; clisp -q -i ../init.lsp ; note: ../init.lsp is in Given ; it includes ; (setq *print-case* :downcase) ; Output.correct was generated using that. ; -- use one of the ty functions to test everything ; for example, in part 1, give the command: ; (ty1) ; -- exit clisp ; (quit) or ^D ; -- compare your output vs. correct output: ; diff Output.correct Output.your ; or ; tkdiff Output.correct Output.your ; files should be identical except timestamps on 2 "Dribble..." lines. ; ; NB: clisp output formatting takes into account the number of columns ; in your window. The Output.correct file was generated ; for 80 column output. Your output may differ for different sized windows. ; It's okay if your output is the same except for whitespace formatting ; (but easier, so you can use diff, if you run in an 80 column window). ; ; you might find some of the other functions below helpful in your testing ; e.g., to test all of part2 (and all of part1) ; w/o writing to Output.your, use ; (test-part2) ; e.g., to test only all of part2 but none of part1 ; w/o writing to Output.your, use ; (test-only-part2) (defun testOneSaveOutput (testPartFunction) (saveOutputBegin) (testOne testPartFunction) (saveOutputEnd) ) (defun testOne (testPartFunction) (format t "~%~10TBEGIN TESTING~2%") (funcall testPartFunction) (format t "~%~10TDONE TESTING~2%") t ) ; delete-file is needed because some clisps (e.g., the one on Linux PC) ; append rather than truncate when dribbling to an existing file. (defun saveOutputBegin () (delete-file "Output.your") (dribbleNoTimeStamp "Output.your") ) (defun saveOutputEnd () (dribbleNoTimeStamp) ) ;;;; modified from clisp-2.49/src/dribble.lisp ;;;; ;;;; as name suggests, doesn't output timestamp ;;;; so that diff doesn't complain about different timestamps. ;;;; ;;;; since original dribble is in SYSTEM and this dribble isn't, ;;;; needed to add a few SYSTEM:: for some functions. ;;;; (I might have missed some.) ;;;; (would need on date-string if used that again.) ;;;; Dribble (defun dribbleNoTimeStamp-toggle (stream &optional file) (multiple-value-bind (source target) (dribble-stream stream) (if source (if file ; already dribbling (warn (SYSTEM::TEXT "Already dribbling ~S to ~S") source target) (progn ;;(format target (TEXT "~&;; Dribble of ~S finished on ~A.~%") ;; source (date-string)) (format target (SYSTEM::TEXT "~&;; DribbleNoTimeStamp of ~S finished.~%") source) (values source target))) (if file ; not dribbling (let ((target (if (and (streamp file) (open-stream-p file) (output-stream-p file)) file (open file :direction :output :external-format (stream-external-format stream) :if-exists :append :if-does-not-exist :create)))) ;;(format target (SYSTEM::TEXT ";; DribbleNoTimeStamp of ~S started on ~A.~%") ;; stream (date-string)) (format target (SYSTEM::TEXT ";; DribbleNoTimeStamp of ~S started.~%") stream) (values (make-dribble-stream stream target) target)) (warn (SYSTEM::TEXT "Currently not dribbling from ~S.") stream))))) (defun dribbleNoTimeStamp (&optional file) (multiple-value-bind (source target) (dribbleNoTimeStamp-toggle *terminal-io* file) (when (streamp source) ; no warning (unless file (close target)) ; dribble off (setq *terminal-io* source)) target)) ; part tests (each tests all previous parts and all in this part) ; output saved to a file (defun ty1 () (saveOutputBegin) (test-part1) (saveOutputEnd) ) (defun ty2 () (saveOutputBegin) (test-part2) (saveOutputEnd) ) (defun ty3 () (saveOutputBegin) (test-part3) (saveOutputEnd) ) (defun ty4 () (saveOutputBegin) (test-part4) (saveOutputEnd) ) (defun ty5 () (saveOutputBegin) (test-part5) (saveOutputEnd) ) (defun ty6 () (saveOutputBegin) (test-part6) (saveOutputEnd) ) (defun ty7 () (saveOutputBegin) (test-part7) (saveOutputEnd) ) (defun ty8 () (saveOutputBegin) (test-part8) (saveOutputEnd) ) (defun ty9 () (saveOutputBegin) (test-part9) (saveOutputEnd) ) ; part tests (each tests all previous parts and all in this part) (defun test-part1 () (test-only-part1)) (defun test-part2 () (test-part1) (test-only-part2) ) (defun test-part3 () (test-part2) (test-only-part3) ) (defun test-part4 () (test-part3) (test-only-part4) ) (defun test-part5 () (test-part4) (test-only-part5) ) (defun test-part6 () (test-part5) (test-only-part6) ) (defun test-part7 () (test-part6) (test-only-part7) ) (defun test-part8 () (test-part7) (test-only-part8) ) (defun test-part9 () (test-part8) (test-only-part9) ) ; some shorthands, so that you can just type, e.g., (tp1) (defun tp1 () (test-part1)) (defun tp2 () (test-part2)) (defun tp3 () (test-part3)) (defun tp4 () (test-part4)) (defun tp5 () (test-part5)) (defun tp6 () (test-part6)) (defun tp7 () (test-part7)) (defun tp8 () (test-part8)) (defun tp9 () (test-part9)) (defun top1 () (test-only-part1)) (defun top2 () (test-only-part2)) (defun top3 () (test-only-part3)) (defun top4 () (test-only-part4)) (defun top5 () (test-only-part5)) (defun top6 () (test-only-part6)) (defun top7 () (test-only-part7)) (defun top8 () (test-only-part8)) (defun top9 () (test-only-part9)) ; part specific tests (defun test-only-part1 () (test-cross1)) (defun test-only-part2 () (test-cross2)) (defun test-only-part3 () (test-my-every)) (defun test-only-part4 () (test-flatp)) (defun test-only-part5 () (test-lenLFL)) (defun test-only-part6 () (test-legalcondp)) (defun test-only-part7 () (test-rewrite)) (defun test-only-part8 () (test-check)) (defun test-only-part9 () (test-rewrite-ite) (test-check-ite) ) ; some abbreviations, so that you can just type, e.g., (tc1) (defun tc1 () (test-cross1)) (defun tc2 () (test-cross2)) (defun te () (test-my-every)) (defun tf () (test-flatp)) (defun tF () (test-lenLFL)) (defun tl () (test-legalcondp)) (defun tw () (test-rewrite)) (defun tc () (test-check)) (defun tx () (test-rewrite-ite)) (defun td () (test-check-ite)) ; test all the cross1 functions (defun test-cross1 () (format t "~%~20TTEST-CROSS1~2%") (test-cross1-recursive) (test-cross1-iterative) (test-cross1-mapcar) t ) (defun test-cross1-recursive () (test-a-cross 'cross1-recursive) t ) (defun test-cross1-iterative () (test-a-cross 'cross1-iterative) t ) (defun test-cross1-mapcar () (test-a-cross 'cross1-mapcar) t ) ; test all the cross2 functions (defun test-cross2 () (format t "~%~20TTEST-CROSS2~2%") (test-cross2-recursive) (test-cross2-iterative) (test-cross2-mapcar) t ) (defun test-cross2-recursive () (test-a-cross 'cross2-recursive) t ) (defun test-cross2-iterative () (test-a-cross 'cross2-iterative) t ) (defun test-cross2-mapcar () (test-a-cross 'cross2-mapcar) t ) ; tests the cross function cross-fun. ; prints out cross-fun instead of actual name, ; e.g., (cross-fun nil nil) instead of (cross1-recursive nil nil) ; (defun test-a-cross (fun) (format t "~%~30TTEST-A-CROSS on: ~A~2%" fun) (defun cross-fun (x y) (funcall fun x y)) (tester '(cross-fun 88 99) ) (tester '(cross-fun 88 nil) ) (tester '(cross-fun nil 99) ) (tester '(cross-fun '(1) 99) ) (tester '(cross-fun nil nil) ) (tester '(cross-fun '(1) nil) ) (tester '(cross-fun nil '(a)) ) (tester '(cross-fun '(1) '(a)) ) (tester '(cross-fun '(1) '(a b)) ) (tester '(cross-fun '(1 2) '(a)) ) (tester '(cross-fun '(1 2) '(a b)) ) (tester '(cross-fun '(1 2 3) '(a b)) ) (tester '(cross-fun '(1 2) '(a b c)) ) t ) (defun test-my-every () (format t "~%~20TTEST-MY-EVERY~2%") (tester '(my-every #'listp '())) (tester '(my-every #'listp '(1))) (tester '(my-every #'listp '(1 2))) (tester '(my-every #'listp '(1 2 3))) (tester '(my-every #'integerp '())) (tester '(my-every #'integerp '(1))) (tester '(my-every #'integerp '(1 2))) (tester '(my-every #'integerp '(1 2 3))) (tester '(my-every #'integerp '(1 a 2))) (tester '(my-every #'integerp '(a 1 2))) (tester '(my-every #'integerp '(1 2 a))) (tester '(my-every #'(lambda (a) (> a 4)) '(5 6 9))) (tester '(my-every #'(lambda (a) (> a 4)) '(5 6 0 9))) t ) (defun test-a-flat (fun) (format t "~%~30TTEST-A-FLAT on: ~A~2%" fun) (defun flat-fun (x) (funcall fun x)) (tester '(flat-fun '()) ) (tester '(flat-fun '(())) ) (tester '(flat-fun '(1)) ) (tester '(flat-fun '(1 2)) ) (tester '(flat-fun '(1 2 3)) ) (tester '(flat-fun '(1 nil 2 nil 3)) ) (tester '(flat-fun '(1 (2) 3)) ) (tester '(flat-fun '((1 a b) (2) 3)) ) (tester '(flat-fun '((1 2) 3 4 5 6 7 8) ) ) (tester '(flat-fun '(0 (1 2) 3 4 5 6 7 8) ) ) (tester '(flat-fun '(0 1 2 3 4 (5 6 7 8)) ) ) (tester '(flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) ) (tester '(flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) ) (tester '(flat-fun '((((1 nil 2 nil 3)))) ) ) (tester '(flat-fun '((((((1)))))) ) ) (tester '(flat-fun '((((((1)) (222 223))))) ) ) (tester '(flat-fun '((((((1 2 3 4)))))) ) ) t ) (defun test-flatp () (format t "~%~20TTEST-flatp~2%") (test-a-flat 'flatp) t ) (defun test-lenLFL () (format t "~%~20TTEST-lenLFL~2%") (test-a-flat 'lenLFL) t ) (defun test-legalcondp () (format t "~%~20TTEST-LEGALCONDP~2%") (test-a-later 'legalcondp) t ) (defun test-rewrite () (format t "~%~20TTEST-REWRITE~2%") (test-a-later 'rewrite) t ) (defun test-rewrite-ite () (format t "~%~20TTEST-REWRITE-ITE~2%") (test-a-later 'rewrite-ite) t ) (defun test-check () (format t "~%~20TTEST-CHECK~2%") (test-a-later 'check) t ) (defun test-check-ite () (format t "~%~20TTEST-CHECK-ITE~2%") (test-a-later 'check-ite) t ) ; test a later part of the HW (defun test-a-later (fun) (format t "~%~30TTEST-A-LATER on: ~A~2%" fun) (defun later-fun (y) (funcall fun y)) (tester '(later-fun nil )) (tester '(later-fun 3 )) (tester '(later-fun '(list 1 2 3 4) )) (tester '(later-fun '(cond nil) )) (tester '(later-fun '(cond 3) )) (tester '(later-fun '(cond 3 4) )) (tester '(later-fun '(cond (3 4)) )) (tester '(later-fun '(cond (3)) )) (tester '(later-fun '(cond (3 4) 5) )) (tester '(later-fun '(if 3 4 5) )) (tester '(later-fun '(if 3 4 (if 5 6)) )) (tester '(later-fun '(if nil 4 (if 5 6)) )) (tester '(later-fun '(cond (3 4 5)) )) (tester '(later-fun '(cond (1) (2) (3 4 5) (6)) )) (tester '(later-fun '(cond notlist) )) (tester '(later-fun '(cond (nil 3) notlist) )) (tester '(later-fun '(cond ((+ 1 22) 3) notlist) )) (tester '(later-fun '(cond (nil 3) (4)) )) (tester '(later-fun '(cond (3 4) (5)) )) (tester '(later-fun '(cond (3 4) 5 (6)) )) (tester '(later-fun '(cond (3 4) nil (6)) )) (tester '(later-fun '(cond (3 4) (t 5)) )) (tester '(later-fun '(cond ((= 3 4) 11) (t 15)) )) (tester '(later-fun '(cond ((= 3 3) 11) (t 15)) )) (tester '(later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17)) )) (tester '(later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) ) (tester '(later-fun '(* 44 (cond (3 2) (5))) )) (tester '(later-fun '(* 44 (cond (3 2) (t 5))) )) (tester '(later-fun '(* 44 (cond (nil 7) (10))) )) (tester '(later-fun '(* 44 (cond (nil 7) (t 10))) )) (tester '(later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5)) )) (tester '(later-fun '(cond ((cond (3 8) 9) 4) (t 5)) )) ; bad (tester '(later-fun '(cond (nil 4) (t 5)) )) (tester '(later-fun '(* 44 (cond (3 2) (t 5))) )) (tester '(later-fun '(* 44 (cond (nil 7) (t 10))) )) (tester '(later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6))))) )) (tester '(later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5)) )) (tester '(later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5)) )) (tester '(later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9) ) ) 4) (t 5) ) )) (tester '(later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9) ) ) 4) (t 5) ) )) (tester '(later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9) ) ) 4) (t 5) ) )) (tester '(later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9) ) ) 4) (t 5) ) )) (tester '(later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)) ) ) ) (tester '(later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)) ) ) ) (tester '(later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)) ) ) ) (tester '(later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)) ) ) ) t ) ; low-level testing routine (defun tester (x) (format t "testing: ~A~%" x) ; split into 2 so print value even if eval fails. (format t "value: ") (format t "~A~2%" (eval x)) t )

Given/part7/Output.correct

;; DribbleNoTimeStamp of #<io terminal-stream> started. BEGIN TESTING TEST-CROSS1 TEST-A-CROSS on: cross1-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-CROSS2 TEST-A-CROSS on: cross2-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-MY-EVERY testing: (my-every #'listp 'nil) value: t testing: (my-every #'listp '(1)) value: nil testing: (my-every #'listp '(1 2)) value: nil testing: (my-every #'listp '(1 2 3)) value: nil testing: (my-every #'integerp 'nil) value: t testing: (my-every #'integerp '(1)) value: t testing: (my-every #'integerp '(1 2)) value: t testing: (my-every #'integerp '(1 2 3)) value: t testing: (my-every #'integerp '(1 a 2)) value: nil testing: (my-every #'integerp '(a 1 2)) value: nil testing: (my-every #'integerp '(1 2 a)) value: nil testing: (my-every #'(lambda (a) (> a 4)) '(5 6 9)) value: t testing: (my-every #'(lambda (a) (> a 4)) '(5 6 0 9)) value: nil TEST-flatp TEST-A-FLAT on: flatp testing: (flat-fun 'nil) value: t testing: (flat-fun '(nil)) value: nil testing: (flat-fun '(1)) value: t testing: (flat-fun '(1 2)) value: t testing: (flat-fun '(1 2 3)) value: t testing: (flat-fun '(1 nil 2 nil 3)) value: nil testing: (flat-fun '(1 (2) 3)) value: nil testing: (flat-fun '((1 a b) (2) 3)) value: nil testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: nil testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((((1 nil 2 nil 3))))) value: nil testing: (flat-fun '((((((1))))))) value: nil testing: (flat-fun '((((((1)) (222 223)))))) value: nil testing: (flat-fun '((((((1 2 3 4))))))) value: nil TEST-lenLFL TEST-A-FLAT on: lenlfl testing: (flat-fun 'nil) value: 0 testing: (flat-fun '(nil)) value: 0 testing: (flat-fun '(1)) value: 1 testing: (flat-fun '(1 2)) value: 2 testing: (flat-fun '(1 2 3)) value: 3 testing: (flat-fun '(1 nil 2 nil 3)) value: 0 testing: (flat-fun '(1 (2) 3)) value: 1 testing: (flat-fun '((1 a b) (2) 3)) value: 3 testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: 2 testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: 2 testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: 4 testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: 5 testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: 10 testing: (flat-fun '((((1 nil 2 nil 3))))) value: 0 testing: (flat-fun '((((((1))))))) value: 1 testing: (flat-fun '((((((1)) (222 223)))))) value: 2 testing: (flat-fun '((((((1 2 3 4))))))) value: 4 TEST-LEGALCONDP TEST-A-LATER on: legalcondp testing: (later-fun nil) value: t testing: (later-fun 3) value: t testing: (later-fun '(list 1 2 3 4)) value: t testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: t testing: (later-fun '(cond (3))) value: t testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: t testing: (later-fun '(if 3 4 (if 5 6))) value: t testing: (later-fun '(if nil 4 (if 5 6))) value: t testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: t testing: (later-fun '(cond (3 4) (5))) value: t testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: t testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: t testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: t testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: t testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: t testing: (later-fun '(* 44 (cond (3 2) (5)))) value: t testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: t testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: t testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: t testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: t testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: t testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: t testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: t TEST-REWRITE TEST-A-LATER on: rewrite testing: (later-fun nil) value: nil testing: (later-fun 3) value: 3 testing: (later-fun '(list 1 2 3 4)) value: (list 1 2 3 4) testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: (if 3 4) testing: (later-fun '(cond (3))) value: (if 3 3) testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: (if 3 4 5) testing: (later-fun '(if 3 4 (if 5 6))) value: (if 3 4 (if 5 6)) testing: (later-fun '(if nil 4 (if 5 6))) value: (if nil 4 (if 5 6)) testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: (if nil 3 (if 4 4)) testing: (later-fun '(cond (3 4) (5))) value: (if 3 4 (if 5 5)) testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: (if 3 4 (if t 5)) testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: (if (= 3 4) 11 (if t 15)) testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: (if (= 3 3) 11 (if t 15)) testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: (if (= 3 4) 11 (if (= 5 6) 12 (if t 17))) testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: (list (if (= 8 8) 'y) (if (= 8 7) 'no)) testing: (later-fun '(* 44 (cond (3 2) (5)))) value: (* 44 (if 3 2 (if 5 5))) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (* 44 (if 3 2 (if t 5))) testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: (* 44 (if nil 7 (if 10 10))) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (* 44 (if nil 7 (if t 10))) testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: (if (if 3 8 (if t 9)) 4 (if t 5)) testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: (if nil 4 (if t 5)) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (* 44 (if 3 2 (if t 5))) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (* 44 (if nil 7 (if t 10))) testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 8 (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: (if (= 8 (if nil 8 (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 7) 8 (if t 1)) (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 6) 8 (if t 1)) (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 6) 8 (if (if (+ 1 22) 3 (if t 77)) (if (+ 1 22) 3 (if t 77)))) (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: (cons (if (= 8 7) 'bad (if t 'good)) (if (= 8 7) 'nope (if t 'yup))) testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: (list (if (= 8 7) 'bad) (if (= 8 7) 'nope)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: (list (if (= 8 8) 'yes) (if (= 8 8) 'okay)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: (list (if (= 8 8) 'yes) (if (= 8 7) 'nope)) DONE TESTING ;; DribbleNoTimeStamp of #<io terminal-stream> finished.

Given/init.lsp

(load "s.l") (load "../test.l") (setq *print-case* :downcase) (defmacro pp (x) (pprint (symbol-function x)))

Given/tester

#!/bin/bash # ECS14A program testing tool # Copyright 2016 by Ronald A. Olsson # # Permission is granted only to use this code and its related files for # its intended purpose of testing programming assignments in Olsson's # ECS140A class at UC Davis. # Any other usage, without explicit written permission from Olsson, # is not allowed. # command and short name, for error messages. declare -r command="$0 $*" declare -r thisScriptName=` basename "$0"` # toggle some debugging output. declare debug=1 # make the "debug tag" a bit unique so not likely to appear w/i regular output # (can grep out lines w/ it) declare -r debugTAG="DE+buG" function debug() { local -r msg=$1 if [ $debug -eq 0 ] then echo "$debugTAG: $msg" fi } # if script should exit, # shouldExit is some non-zero number, returned as exit status. function userError() { local -r giveTryMsg=$1 local -r shouldExit=$2 local -r msg=$3 echo "$thisScriptName error: $msg" 1>&2 if [ $giveTryMsg -ne 0 ] then echo "Try '$thisScriptName --help' for more information." 1>&2 fi if [ $shouldExit -ne 0 ]; then exit $shouldExit fi } ### homework test parameters, flags ### # from command line declare diffTool="diff" declare showDiff=false # true if showdiff is set # name of HW Descriptor File declare -r HDF="HWDesc" declare -r markerPrefix="+" # indicates command lines in HDF, e.g., "+part3" ### functions ### function printUsage { cat <<EOF Usage: $thisScriptName [OPTIONS] OPTIONS: -h, --help Display this help menu. -d diffTool, --diff=diffTool Use diffTool to compare expected and actual outputs; default is diff. -k, --k Abbreviation for the useful "-d cmpORtkdiff". -s, --showDiffs Show the differences from a previous run of $thisScriptName. -t or --test (HW2 only.) Run only specified test(s). -T or --Test (HW2 only.) Like -t, but for tests with non-standard names. -m or --masquerade=partName Run within a part subdirectory with a non-standard name as though running within partName. For more information, see the web page for tester on the class web page. EOF } function mustCd { local -r dir=$1 cd "$dir" if [ $? -ne 0 ] then userError 0 1 "failed to change directory $dir" fi } # returns $diffTool's exit status indicating whether two files are same. function runDiffTool { local -r file1="$1" local -r file2="$2" $diffTool "$file1" "$file2" } # if no diffs, tkdiff still pops up and needs to be exited by a keystroke. # this doesn't invoke tkdiff unless there is a diff. # # not used by tester itself, but by users as the diffTool via "-d cmpORtkdiff" function cmpORtkdiff { local -r file1="$1" local -r file2="$2" cmp -s "$file1" "$file2" || tkdiff "$file1" "$file2" } # runCommand returns: # actual status of command function runCommand { local cmnd=$1 local -r fileIn=$2 local -r fileOut=$3 local -r redirectOutput=$4 debug " runCommand t=$t" debug "runCommand cmnd=$cmnd" # cmnd w/ any redirection local rcmnd="$cmnd" if [ -n "$fileIn" ] then rcmnd+=" < $fileIn" fi if [ -n "$fileOut" ] then rcmnd+=" > $fileOut" fi # do this *after* redirecting ">" if [[ "$redirectOutput" == "true" ]]; then rcmnd+=" 2>&1" fi eval $rcmnd local runStatus=$? debug "cmnd=$cmnd runStatus=$runStatus" return $runStatus } # reads from stdin, which has been set (via redirection) by caller. function testAll { local whichPart local numRuns # number of commands to run local retStat=0 # status to return: did all goes as expected? # handle each part while searchHDF 1 do whichPart="$searchHDFRetValPart" numRuns=$searchHDFRetValNumRuns # got a part! debug "got a part! $whichPart $numRuns" mustCd "$whichPart" testPart "$whichPart" $numRuns retStat=$(($retStat || $?)) mustCd ".." done return $retStat } # reads from stdin, which has been set (via redirection) by caller. # positioned at "+" lines in HDF function testPart { local -r whichPart="$1" local -r numRuns=$2 # number of commands to run runs ## read from HDF local redirectOutput # true if command output should be redirected to output file # false if command redirects output itself (e.g., clisp, gprolog) # or output not needed (e.g., make, rm) local shouldDiff # true if diffTool should be used local YO # output file name local YC # correct output file name local statusCorrect # expected command status local cmnd # command called local marker local i # status to return from this entire function -- did all go as expected? local returnStatus=0 echo "======== $whichPart ========" # loop for all the commands that need to be run for (( i = 0; i < $numRuns; i++ )); do read marker redirectOutput shouldDiff YO YC statusCorrect cmnd debug "for loop i=$i marker=$marker numRuns=$numRuns \"cmnd=$cmnd\"" # integrity check if [ "$marker" != "$markerPrefix$whichPart" ] then userError 0 1 "got bad marker (\"$marker\") instead of expected (\"$markerPrefix$whichPart\") from \"$HDF\" file" fi if ! [ $onlyShowDiffs -eq 0 ] then local runStatus if [[ "$redirectOutput" == "true" ]]; then runCommand "$cmnd" "" "$YO" "$redirectOutput" runStatus=$? doConvertOutputFileToUnix "$YO" else runCommand "$cmnd" "" "" "$redirectOutput" runStatus=$? fi compareStatuses "$cmnd" $runStatus $statusCorrect returnStatus=$(($returnStatus || $?)) if [[ "$shouldDiff" == "true" ]] then runDiffTool "$YC" "$YO" # shouldn't have any differences, so count it too. returnStatus=$(($returnStatus || $?)) fi elif isHW2 then # some magic (aka, a hack) # need to runcommand hw2special # to see its diff, # but we skip over it above. # could not skip over it, but that gets uglier. # so special case it here. # (could call a different function in Addendum, # which just does the diffs, # but that would replicate # some of hw2special's code.) hw2special 999 # any number will do returnStatus=$? # assume that only want to do this once break else # written so that will runDiffTool # for each command for which $shouldDiff is set. # set $returnStatus to pretend all was well. returnStatus=0 if [ -r "$YO" ] && [ "$shouldDiff" == "true" ] then runDiffTool $YC $YO fi fi # don't keep doing other commands for this part # if one command didn't complete as expected. if [ $returnStatus -ne 0 ] then break fi debug "end for loop i=$i numRuns=$numRuns \"cmnd=$cmnd\"" done return $returnStatus } # check expected and actual statuses. # don't put this checking as part of runCommand # since that generates error message, # and invokers (namely for HW2) sometimes want to redirect stderr. function compareStatuses { local cmnd=$1 local got=$2 local wanted=$3 local returnStatus if [ $got -ne $wanted ] then userError 0 0 "\"$cmnd\" completed with incorrect status of $got vs. expected status of $wanted" returnStatus=1 else returnStatus=0 fi return $returnStatus } # user specified tests declare specificTests # tests from -t declare specificTests2 # tests from -T # for -m, non-standard part declare masqueradeAs declare masqueradeOption # don't actually run the commands # only show diffs based on their last runs. declare onlyShowDiffs=1 ### read parameters ### # each LONGOPTION has a corresponding SHORTOPTION declare -r LO0="help,debug" declare -r LO1="diff:,k,masquerade:,showDiffs" declare -r LO2="test:,Test:" declare -r LONGOPTIONS="$LO0,$LO1,$LO2" declare -r SHORTOPTIONS="hgd:km:st:T:" # bash note: don't combine next two lines (declare and assignment) # since would get exit status of declare (success), not exit status of getopt. declare args # are we running with modern getopt? # Mac OS X has BSD style, which doesn't support long options # and supports only "getopt optstring parameters" form of invocation. # (we'll give up the luxury of long options for older getopt versions.) # note: man page for GNU getopt says GNU's exit status will be 4; other's 0. # hope that's the case. if getopt -T >& /dev/null then args=$(getopt "$SHORTOPTIONS" "$@") else # getopt note: -o needs to be last option. args=$(getopt --name=$thisScriptName -l "$LONGOPTIONS" -o "$SHORTOPTIONS" -- "$@") fi if [ $? -ne 0 ] then userError 1 1 "couldn't process command line arguments" fi eval set -- "$args" # handle options and their arguments while true do declare arg="$1" case "$arg" in -h|--help) printUsage exit 0 ;; -g|--debug) shift debug=$((!$debug)) ;; -d|--diff) shift diffTool="$1" shift ;; -k|--k) shift diffTool="cmpORtkdiff" ;; -m|--masquerade) shift masqueradeOption="$1" masqueradeAs="$1" shift ;; -t|--tests) shift specificTests+=" $1" shift ;; -T|--Tests) shift specificTests2+=" $1" shift ;; -s|--showDiffs) shift onlyShowDiffs=0 ;; --) shift break ;; *) userError 1 1 "unknown command-line argument \"$arg\"" # above exits ;; esac done if [ $# -gt 0 ] then userError 1 1 "unknown command-line argument(s) \"$*\"" fi declare onCygwinEtc=0 # this test captures Cygwin, MinGW, and Msys2. # all Linux shell environments on Windows have "_NT" in their kernel names. if [[ "$(uname -s)" == *_NT* ]] then onCygwinEtc=1 fi # need to "unix-ize" output files? # i.e., run dos2unix on them to change DOS format into Unix format. # we assume that the "correct" output files are in Unix format. declare convertOutputFileToUnix=1 if [ $onCygwinEtc -eq 1 ] then convertOutputFileToUnix=0 fi function doConvertOutputFileToUnix { local -r file="$1" if [ $convertOutputFileToUnix -eq 0 ] then dos2unix --quiet "$file" fi } # note: considered using bash's way to figure out location of source # (using ${BASH_SOURCE[0], etc.) # but for testing new versions, that location wouldn't relate to relPath. declare relPath declare relPathHDF # are we in main HW directory or in a part directory? # null means false declare inHW declare inPart # find $HDF # sets globals, as appropriate function findHDF { if [ -e "$HDF" ] then inHW=0 # any non-null relPath="." elif [ -e "../$HDF" ] then inPart=0 # any non-null relPath=".." else userError 0 1 "can't find $HDF" fi relPathHDF="$relPath/$HDF" # sanity check if [ ! -r "$relPathHDF" ] then userError 0 1 "found $relPathHDF but can't read it (use chmod to fix its permission bits)" fi debug "found $relPathHDF $relPathHDF" } # supposedly in a part directory. # check that it's known. # return that part in a global declare findPartRetVal function findPart { local -r where=`pwd` local -r base=`basename "$where"` debug "base=$base" debug "rel=$relPathHDF base=$base" checkPartName "$base" # exits if bad part findPartRetVal="$base" } # known part name? function checkPartName { local -r base="$1" if ! searchHDF 0 "$base" < "$relPathHDF" then userError 1 1 "found $base but that's not a standard part name (use, e.g., \"-m part06\" to specify part06)" fi debug "checkPartName found part $base !" } # search HDF for part # reads from stdin, which has been set (via redirection) by caller. # two modes: # search for given part # search for next part # for either successful search, sets globals for that part declare searchHDFRetValPart declare searchHDFRetValNumRuns function searchHDF { local -r givenPartMode=$1 local -r part="$2" local whichPart local numRuns while read whichPart numRuns do case $whichPart in "#"*) continue;; "$markerPrefix"*) continue;; "") continue;; *) if [ $givenPartMode -eq 1 ] || [ "$whichPart" = "$part" ] then searchHDFRetValPart="$whichPart" searchHDFRetValNumRuns=$numRuns return 0 fi ;; esac done return 1 } # calls other functions that read from stdin, # which has been set (via redirection) by caller. function doAPart { local thePart="$1" local numRuns searchHDF 0 "$thePart" numRuns=$searchHDFRetValNumRuns testPart "$thePart" $numRuns # returns testPart's status } # these are very conservative. # ideally, specify for each HW, or even part of HW. if [ $onCygwinEtc -eq 0 ] then # not supported on Cygwin. ulimit -t 12 # time (seconds) ulimit -f 12000 # space (disk blocks) fi # if ulimit -f is exceeded, core file is created, but we don't want one ulimit -c 0 # prevent core file from being created ### test ### findHDF # any extra pieces needed for testing? declare -r testerAddendum="testerAddendum" if [ -r "$relPath/$testerAddendum" ] then source "$relPath/$testerAddendum" fi # are we testing HW2? # don't use this function until after doing above source. function isHW2 { declare -F hw2special > /dev/null } if ! isHW2 && ( [ -n "$specificTests" ] || [ -n "$specificTests2" ] ) then userError 0 1 "can only use \"-t\" or \"-T\" with HW2" fi declare retStatus=0 if [ -n "$inPart" ] then debug "inPart" declare thePart if [ -n "$masqueradeAs" ] then checkPartName "$masqueradeAs" thePart="$masqueradeAs" else findPart thePart="$findPartRetVal" fi doAPart "$thePart" < "$relPathHDF" retStat=$? elif [ -n "$inHW" ] then if [ -n "$masqueradeAs" ] then userError 0 1 "$masqueradeOption specified in HW directory; must be in a part directory (so, first cd to where you want to test)" fi debug "inHW $relPathHDF" testAll < "$relPathHDF" retStat=$? echo -n "$thisScriptName summary: " if [ $retStat -eq 0 ] then echo "all went well!" else echo "some possible problems, which were previously noted." fi else userError 0 1 "OOPS: neither inPart (\"$inPart\") nor inHW (\"$inHW\")" fi # returns exit status of testing commands. exit $retStat

Given/README

List students alphabetically, sorting by ***last name***. Include CSIF account name for each student. Do not include student ID numbers. E.g., Doe, Diane ddoe Smith, Joe joesmith *** Give the status of your work; here's a sample. Status: part1: Works on all tests. part2: Works on all tests. part3: Works on all tests. part4: Works on all tests. part5: Works on only the first test case. part6: Did not attempt. part7: Did not attempt. part8: Did not attempt. part9: Did not attempt. Overall: Any comment/discussion related to this HW.

Given/part3/Output.correct

;; DribbleNoTimeStamp of #<io terminal-stream> started. BEGIN TESTING TEST-CROSS1 TEST-A-CROSS on: cross1-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-CROSS2 TEST-A-CROSS on: cross2-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-MY-EVERY testing: (my-every #'listp 'nil) value: t testing: (my-every #'listp '(1)) value: nil testing: (my-every #'listp '(1 2)) value: nil testing: (my-every #'listp '(1 2 3)) value: nil testing: (my-every #'integerp 'nil) value: t testing: (my-every #'integerp '(1)) value: t testing: (my-every #'integerp '(1 2)) value: t testing: (my-every #'integerp '(1 2 3)) value: t testing: (my-every #'integerp '(1 a 2)) value: nil testing: (my-every #'integerp '(a 1 2)) value: nil testing: (my-every #'integerp '(1 2 a)) value: nil testing: (my-every #'(lambda (a) (> a 4)) '(5 6 9)) value: t testing: (my-every #'(lambda (a) (> a 4)) '(5 6 0 9)) value: nil DONE TESTING ;; DribbleNoTimeStamp of #<io terminal-stream> finished.

Given/part1/Output.correct

;; DribbleNoTimeStamp of #<io terminal-stream> started. BEGIN TESTING TEST-CROSS1 TEST-A-CROSS on: cross1-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) DONE TESTING ;; DribbleNoTimeStamp of #<io terminal-stream> finished.

Given/part8/Output.correct

;; DribbleNoTimeStamp of #<io terminal-stream> started. BEGIN TESTING TEST-CROSS1 TEST-A-CROSS on: cross1-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-CROSS2 TEST-A-CROSS on: cross2-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-MY-EVERY testing: (my-every #'listp 'nil) value: t testing: (my-every #'listp '(1)) value: nil testing: (my-every #'listp '(1 2)) value: nil testing: (my-every #'listp '(1 2 3)) value: nil testing: (my-every #'integerp 'nil) value: t testing: (my-every #'integerp '(1)) value: t testing: (my-every #'integerp '(1 2)) value: t testing: (my-every #'integerp '(1 2 3)) value: t testing: (my-every #'integerp '(1 a 2)) value: nil testing: (my-every #'integerp '(a 1 2)) value: nil testing: (my-every #'integerp '(1 2 a)) value: nil testing: (my-every #'(lambda (a) (> a 4)) '(5 6 9)) value: t testing: (my-every #'(lambda (a) (> a 4)) '(5 6 0 9)) value: nil TEST-flatp TEST-A-FLAT on: flatp testing: (flat-fun 'nil) value: t testing: (flat-fun '(nil)) value: nil testing: (flat-fun '(1)) value: t testing: (flat-fun '(1 2)) value: t testing: (flat-fun '(1 2 3)) value: t testing: (flat-fun '(1 nil 2 nil 3)) value: nil testing: (flat-fun '(1 (2) 3)) value: nil testing: (flat-fun '((1 a b) (2) 3)) value: nil testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: nil testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((((1 nil 2 nil 3))))) value: nil testing: (flat-fun '((((((1))))))) value: nil testing: (flat-fun '((((((1)) (222 223)))))) value: nil testing: (flat-fun '((((((1 2 3 4))))))) value: nil TEST-lenLFL TEST-A-FLAT on: lenlfl testing: (flat-fun 'nil) value: 0 testing: (flat-fun '(nil)) value: 0 testing: (flat-fun '(1)) value: 1 testing: (flat-fun '(1 2)) value: 2 testing: (flat-fun '(1 2 3)) value: 3 testing: (flat-fun '(1 nil 2 nil 3)) value: 0 testing: (flat-fun '(1 (2) 3)) value: 1 testing: (flat-fun '((1 a b) (2) 3)) value: 3 testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: 2 testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: 2 testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: 4 testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: 5 testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: 10 testing: (flat-fun '((((1 nil 2 nil 3))))) value: 0 testing: (flat-fun '((((((1))))))) value: 1 testing: (flat-fun '((((((1)) (222 223)))))) value: 2 testing: (flat-fun '((((((1 2 3 4))))))) value: 4 TEST-LEGALCONDP TEST-A-LATER on: legalcondp testing: (later-fun nil) value: t testing: (later-fun 3) value: t testing: (later-fun '(list 1 2 3 4)) value: t testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: t testing: (later-fun '(cond (3))) value: t testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: t testing: (later-fun '(if 3 4 (if 5 6))) value: t testing: (later-fun '(if nil 4 (if 5 6))) value: t testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: t testing: (later-fun '(cond (3 4) (5))) value: t testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: t testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: t testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: t testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: t testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: t testing: (later-fun '(* 44 (cond (3 2) (5)))) value: t testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: t testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: t testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: t testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: t testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: t testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: t testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: t TEST-REWRITE TEST-A-LATER on: rewrite testing: (later-fun nil) value: nil testing: (later-fun 3) value: 3 testing: (later-fun '(list 1 2 3 4)) value: (list 1 2 3 4) testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: (if 3 4) testing: (later-fun '(cond (3))) value: (if 3 3) testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: (if 3 4 5) testing: (later-fun '(if 3 4 (if 5 6))) value: (if 3 4 (if 5 6)) testing: (later-fun '(if nil 4 (if 5 6))) value: (if nil 4 (if 5 6)) testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: (if nil 3 (if 4 4)) testing: (later-fun '(cond (3 4) (5))) value: (if 3 4 (if 5 5)) testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: (if 3 4 (if t 5)) testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: (if (= 3 4) 11 (if t 15)) testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: (if (= 3 3) 11 (if t 15)) testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: (if (= 3 4) 11 (if (= 5 6) 12 (if t 17))) testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: (list (if (= 8 8) 'y) (if (= 8 7) 'no)) testing: (later-fun '(* 44 (cond (3 2) (5)))) value: (* 44 (if 3 2 (if 5 5))) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (* 44 (if 3 2 (if t 5))) testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: (* 44 (if nil 7 (if 10 10))) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (* 44 (if nil 7 (if t 10))) testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: (if (if 3 8 (if t 9)) 4 (if t 5)) testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: (if nil 4 (if t 5)) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (* 44 (if 3 2 (if t 5))) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (* 44 (if nil 7 (if t 10))) testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 8 (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: (if (= 8 (if nil 8 (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 7) 8 (if t 1)) (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 6) 8 (if t 1)) (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: (if (= 8 (if 3 (if (= 7 6) 8 (if (if (+ 1 22) 3 (if t 77)) (if (+ 1 22) 3 (if t 77)))) (if t 9))) 4 (if t 5)) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: (cons (if (= 8 7) 'bad (if t 'good)) (if (= 8 7) 'nope (if t 'yup))) testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: (list (if (= 8 7) 'bad) (if (= 8 7) 'nope)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: (list (if (= 8 8) 'yes) (if (= 8 8) 'okay)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: (list (if (= 8 8) 'yes) (if (= 8 7) 'nope)) TEST-CHECK TEST-A-LATER on: check testing: (later-fun nil) value: (t nil nil) testing: (later-fun 3) value: (t 3 3) testing: (later-fun '(list 1 2 3 4)) value: (t (1 2 3 4) (1 2 3 4)) testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: (t 4 4) testing: (later-fun '(cond (3))) value: (t 3 3) testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: (t 4 4) testing: (later-fun '(if 3 4 (if 5 6))) value: (t 4 4) testing: (later-fun '(if nil 4 (if 5 6))) value: (t 6 6) testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: (t 4 4) testing: (later-fun '(cond (3 4) (5))) value: (t 4 4) testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: (t 15 15) testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: (t 11 11) testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: (t 17 17) testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: (t (y nil) (y nil)) testing: (later-fun '(* 44 (cond (3 2) (5)))) value: (t 88 88) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (t 88 88) testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: (t 440 440) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (t 440 440) testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: (t 5 5) testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: (t 88 88) testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: (t 440 440) testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: (t 5 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: (t 4 4) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: (t 5 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: (t 5 5) testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: (t (good . yup) (good . yup)) testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: (t (nil nil) (nil nil)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: (t (yes okay) (yes okay)) testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: (t (yes nil) (yes nil)) DONE TESTING ;; DribbleNoTimeStamp of #<io terminal-stream> finished.

Given/part6/Output.correct

;; DribbleNoTimeStamp of #<io terminal-stream> started. BEGIN TESTING TEST-CROSS1 TEST-A-CROSS on: cross1-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-A-CROSS on: cross1-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: ((1 nil)) testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 (a))) testing: (cross-fun '(1) '(a b)) value: ((1 (a b))) testing: (cross-fun '(1 2) '(a)) value: ((1 (a)) (2 (a))) testing: (cross-fun '(1 2) '(a b)) value: ((1 (a b)) (2 (a b))) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 (a b)) (2 (a b)) (3 (a b))) testing: (cross-fun '(1 2) '(a b c)) value: ((1 (a b c)) (2 (a b c))) TEST-CROSS2 TEST-A-CROSS on: cross2-recursive testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-iterative testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-A-CROSS on: cross2-mapcar testing: (cross-fun 88 99) value: t testing: (cross-fun 88 nil) value: t testing: (cross-fun nil 99) value: t testing: (cross-fun '(1) 99) value: t testing: (cross-fun nil nil) value: nil testing: (cross-fun '(1) nil) value: nil testing: (cross-fun nil '(a)) value: nil testing: (cross-fun '(1) '(a)) value: ((1 a)) testing: (cross-fun '(1) '(a b)) value: ((1 a) (1 b)) testing: (cross-fun '(1 2) '(a)) value: ((1 a) (2 a)) testing: (cross-fun '(1 2) '(a b)) value: ((1 a) (1 b) (2 a) (2 b)) testing: (cross-fun '(1 2 3) '(a b)) value: ((1 a) (1 b) (2 a) (2 b) (3 a) (3 b)) testing: (cross-fun '(1 2) '(a b c)) value: ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c)) TEST-MY-EVERY testing: (my-every #'listp 'nil) value: t testing: (my-every #'listp '(1)) value: nil testing: (my-every #'listp '(1 2)) value: nil testing: (my-every #'listp '(1 2 3)) value: nil testing: (my-every #'integerp 'nil) value: t testing: (my-every #'integerp '(1)) value: t testing: (my-every #'integerp '(1 2)) value: t testing: (my-every #'integerp '(1 2 3)) value: t testing: (my-every #'integerp '(1 a 2)) value: nil testing: (my-every #'integerp '(a 1 2)) value: nil testing: (my-every #'integerp '(1 2 a)) value: nil testing: (my-every #'(lambda (a) (> a 4)) '(5 6 9)) value: t testing: (my-every #'(lambda (a) (> a 4)) '(5 6 0 9)) value: nil TEST-flatp TEST-A-FLAT on: flatp testing: (flat-fun 'nil) value: t testing: (flat-fun '(nil)) value: nil testing: (flat-fun '(1)) value: t testing: (flat-fun '(1 2)) value: t testing: (flat-fun '(1 2 3)) value: t testing: (flat-fun '(1 nil 2 nil 3)) value: nil testing: (flat-fun '(1 (2) 3)) value: nil testing: (flat-fun '((1 a b) (2) 3)) value: nil testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: nil testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: nil testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: nil testing: (flat-fun '((((1 nil 2 nil 3))))) value: nil testing: (flat-fun '((((((1))))))) value: nil testing: (flat-fun '((((((1)) (222 223)))))) value: nil testing: (flat-fun '((((((1 2 3 4))))))) value: nil TEST-lenLFL TEST-A-FLAT on: lenlfl testing: (flat-fun 'nil) value: 0 testing: (flat-fun '(nil)) value: 0 testing: (flat-fun '(1)) value: 1 testing: (flat-fun '(1 2)) value: 2 testing: (flat-fun '(1 2 3)) value: 3 testing: (flat-fun '(1 nil 2 nil 3)) value: 0 testing: (flat-fun '(1 (2) 3)) value: 1 testing: (flat-fun '((1 a b) (2) 3)) value: 3 testing: (flat-fun '((1 2) 3 4 5 6 7 8)) value: 2 testing: (flat-fun '(0 (1 2) 3 4 5 6 7 8)) value: 2 testing: (flat-fun '(0 1 2 3 4 (5 6 7 8))) value: 4 testing: (flat-fun '((1 a b) (2 c d e) 3 5 (6 7 8 fds a) 99)) value: 5 testing: (flat-fun '((1 a b) (2 c (w o n d e r - d o g) e) 3 5 (6 7 8 fds a) 99)) value: 10 testing: (flat-fun '((((1 nil 2 nil 3))))) value: 0 testing: (flat-fun '((((((1))))))) value: 1 testing: (flat-fun '((((((1)) (222 223)))))) value: 2 testing: (flat-fun '((((((1 2 3 4))))))) value: 4 TEST-LEGALCONDP TEST-A-LATER on: legalcondp testing: (later-fun nil) value: t testing: (later-fun 3) value: t testing: (later-fun '(list 1 2 3 4)) value: t testing: (later-fun '(cond nil)) value: nil testing: (later-fun '(cond 3)) value: nil testing: (later-fun '(cond 3 4)) value: nil testing: (later-fun '(cond (3 4))) value: t testing: (later-fun '(cond (3))) value: t testing: (later-fun '(cond (3 4) 5)) value: nil testing: (later-fun '(if 3 4 5)) value: t testing: (later-fun '(if 3 4 (if 5 6))) value: t testing: (later-fun '(if nil 4 (if 5 6))) value: t testing: (later-fun '(cond (3 4 5))) value: nil testing: (later-fun '(cond (1) (2) (3 4 5) (6))) value: nil testing: (later-fun '(cond notlist)) value: nil testing: (later-fun '(cond (nil 3) notlist)) value: nil testing: (later-fun '(cond ((+ 1 22) 3) notlist)) value: nil testing: (later-fun '(cond (nil 3) (4))) value: t testing: (later-fun '(cond (3 4) (5))) value: t testing: (later-fun '(cond (3 4) 5 (6))) value: nil testing: (later-fun '(cond (3 4) nil (6))) value: nil testing: (later-fun '(cond (3 4) (t 5))) value: t testing: (later-fun '(cond ((= 3 4) 11) (t 15))) value: t testing: (later-fun '(cond ((= 3 3) 11) (t 15))) value: t testing: (later-fun '(cond ((= 3 4) 11) ((= 5 6) 12) (t 17))) value: t testing: (later-fun '(list (cond ((= 8 8) 'y)) (cond ((= 8 7) 'no)))) value: t testing: (later-fun '(* 44 (cond (3 2) (5)))) value: t testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (10)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: t testing: (later-fun '(cond ((cond (3 8) (t 9)) 4) (t 5))) value: t testing: (later-fun '(cond ((cond (3 8) 9) 4) (t 5))) value: nil testing: (later-fun '(cond (nil 4) (t 5))) value: t testing: (later-fun '(* 44 (cond (3 2) (t 5)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t 10)))) value: t testing: (later-fun '(* 44 (cond (nil 7) (t (cond (1) (2) (3 4 5) (6)))))) value: nil testing: (later-fun '(cond ((= 8 (cond (3 8) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (nil 8) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 7) 8) (t 1))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) (t 1))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) (t 77))))) (t 9))) 4) (t 5))) value: t testing: (later-fun '(cond ((= 8 (cond (3 (cond ((= 7 6) 8) ((cond ((+ 1 22) 3) notlist)))) (t 9))) 4) (t 5))) value: nil testing: (later-fun '(cons (cond ((= 8 7) 'bad) (t 'good)) (cond ((= 8 7) 'nope) (t 'yup)))) value: t testing: (later-fun '(list (cond ((= 8 7) 'bad)) (cond ((= 8 7) 'nope)))) value: t testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 8) 'okay)))) value: t testing: (later-fun '(list (cond ((= 8 8) 'yes)) (cond ((= 8 7) 'nope)))) value: t DONE TESTING ;; DribbleNoTimeStamp of #<io terminal-stream> finished.