;Deftests for chapter 6 (deftest justinChap6 () (check ;open check (= 120 (labels ((fact (x) ;check for 6.2 (if (= x 1) x (* x (fact (- x 1)))))) (fact 5))) ;check for 6.5 (equal '(10 20 0 10 0) (list (add10) (add10) (reset0) (add10) (reset0))) ); close check ) ;close deftest ;area for closure testing (let ((count 0)) (defun add10 () (setf count (+ count 10))) (defun reset0 () (setf count 0)))