練習問題/解答例/うるう年測定/Scheme

;;割り切れるかどうかを判別
(define (divisible? a b)
 (zero? (modulo a b)))
;;閏年判定
(define (intercalary? year)
 (if (divisible? year 100)
     (if (divisible? year 400)
	  #t
	  #f)
     (if (divisible? year 4)
	  #t
	  #f)))