Login
7 branches 0 tags
Ben (X13/Arch) Fixed nos 007afe7 3 years ago 660 Commits
nujel / benchmark / euler1 / mal.mal
(def! mod (fn* [a b]
               (- a (* (/ a b) b))))

(def! fizz-buzz?
  (fn* [i]
       (if (= 0 (mod i 3))
           true
           (if (= 0 (mod i 5))
               true
               false))))

(def! test-run (fn* [i ret]
                    (if (> i 9999999)
                        ret
                        (test-run (+ 1 i)
                                  (if (fizz-buzz? i)
                                      (+ ret i)
                                      ret)))))
(println (test-run 0 0))