numbers.scm 235 B

12345678910111213
  1. (define (zero? x) (= x 0))
  2. (define (even? x) (= 0 (modulo x 2)))
  3. (define (odd? x) (not (even? x)))
  4. (define (max x y)
  5. (if (> x y)
  6. x
  7. y))
  8. (define (maximum xs)
  9. (if (pair? xs)
  10. (foldl max (car xs) (cdr xs))
  11. #f))