exercism

Exercism solutions.
git clone git://code.dwrz.net/exercism
Log | Files | Refs

leap.el (293B)


      1 ;;; leap.el --- Leap exercise (exercism)
      2 
      3 ;;; Commentary:
      4 
      5 ;;; Code:
      6 
      7 (provide 'leap)
      8 
      9 (defun leap-year-p (year)
     10 "Return whether a given year is a leap-year."
     11   (when (zerop (mod year 4))
     12     (if (zerop (mod year 100))
     13         (when (zerop (mod year 400)) t)
     14       t)))
     15 
     16 ;;; leap.el ends here