summary refs log tree commit diff stats
path: root/fizzbuzz.lith
blob: 1dac1f659a3a177f61ac1ffd5150e47fe9cd32b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
;;;; fizzbuzz program written in lith

(define 1to100 (range 1 100))

(define (to-fizz-buzz n)
    (cond
        ((divides n 15) "FizzBuzz")
        ((divides n 3) "Fizz")
        ((divides n 5) "Buzz")
        (else n)))

(for-each print (map to-fizz-buzz 1to100))