RosettaCodeData/Task/Leap-year/Common-Lisp/leap-year.lisp
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

4 lines
151 B
Common Lisp

(defun leap-year-p (year)
(destructuring-bind (fh h f)
(mapcar #'(lambda (n) (zerop (mod year n))) '(400 100 4))
(or fh (and (not h) f))))