blob: 234c14cbc98b11fd764cc17dc773f9409c31543f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
;;; leap.el --- Leap exercise (exercism)
;;; Commentary:
;;; Code:
(defun divisible-by-p (n d)
(equal 0 (% n d)))
(defun leap-year-p (year)
(and (divisible-by-p year 4)
(or (not (divisible-by-p year 100))
(divisible-by-p year 400))))
(provide 'leap-year-p)
;;; leap.el ends here
|