だいぶ前に書いたけど最近Qiitaが熱いらしいので(以下略
fizzbuzz.scm
(define fizzbuzz '(1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 Fizzbuzz))
(define (solve n)
(let loop ((num 1)(lst fizzbuzz)(m 1))
(cond
((null? lst)
(loop num (map (lambda(x)(if (number? x)(+ x (* 15 m)) x)) fizzbuzz) (+ m 1)))
((>= n num)
(print (car lst))
(loop (+ num 1) (cdr lst) m)))))