@derekhubbard/

RectangularImpressiveBelugawhale

Scheme

No description

fork
loading
main.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(define-macro for
  (lambda (iterator start end . body)
    `(let loop ((,iterator ,start))
      (if (<= ,iterator ,end)
      (loop (+ ,iterator 1) (begin ,@body))))))

(for x 1 100
  (if (and (eqv? (mod x 3) 0) (eqv? (mod x 5) 0))
      (print "FizzBuzz")
      (if (eqv? (mod x 3) 0) 
          (print "Fizz")
          (if (eqv? (mod x 5) 0)
              (print "Buzz")
              (print x))))
BiwaScheme Interpreter version 0.6.4 Copyright (C) 2007-2014 Yutaka HARA and the BiwaScheme team