(defun month-length (mon y) (case mon ((jan mar may jul aug oct dec) 31) ((apr jun sept nov) 30) (feb (if (leap-year y)29 28)) (otherwise "unknown month"))) (defun leap-year (y) (and (zerop (mod y 4)) (or (zerop (mod y 400)) (not (zerop (mod y 100)))))) (deftest test-month-length () (check (equalp '31 (month-length 'jan '2000)) (equalp '29 (month-length 'feb '2004)) (equalp 't (leap-year '2000)) (equalp 'nil (leap-year '1993))))