← Back to Users
klovett's activity in the archive.
Not sure if anyone else finds this straight-forward, but it is how I would write the function in Scheme.(define (leap-year? year) (let ([0-% (lambda (n) (zero? (remainder year n)))]) (or (0-% 400) (and (not (0-% 100)) (0-% 4)))))
Not sure if anyone else finds this straight-forward, but it is how I would write the function in Scheme.
(define (leap-year? year)
(let ([0-% (lambda (n) (zero? (remainder year n)))])
(or (0-% 400) (and (not (0-% 100)) (0-% 4)))))