(deftest tests4jim () (check (= 14 (+ (- 5 1) (+ 3 7))) (= 7 (if (listp 1) (+ 1 2) (+ 3 4))) (= 3 (/ (- 7 1) (- 4 2))) (eql t (listp '(my 3 "Sons"))) (= 4 (4TH '(1 2 3 4))) (= 9 (greater 3 9)) (= 3 (counta '(a b c d a a) 0)) ) ) (defun 4th (lst) (car (cdr (cdr (cdr lst))))) (defun greater (arg1 arg2) (if (> arg1 arg2) arg1 arg2)) (defun counta (lst count) (if (null lst) count (if (eql (car lst) 'a) (counta (cdr lst) (+ count 1)) (counta (cdr lst) count)))) (deftest test-copy-list() (setf x '(a b c)) (setf y (copy-list x)) (check (equal x y) (equal (car x) (car y)))) (deftest test-append() (setf x '(Mountain - eers)) (check (equal '(a b c d) (append '(a b) '(c d))) (equal '(1 2 3 4) (append '(1) '(2) '(3) '(4))) (equal '(buccan - eers) (append '(buccan) (cdr x))))) (deftest test-nested-list() (setf nl (list 'front (list 'nested 'part) 'and 'rest)) (check (equal 'front (car nl)) (equal '((nested part) and rest) (cdr nl)) (equal '(nested part) (car (cdr nl)))))