Last active
August 6, 2017 14:43
-
-
Save anon767/19e9b4f2aa7db6eeff10adb8163ae954 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns tom | |
(:require | |
[clojure.pprint :as pprint] | |
) | |
(:import [tom IFizzBuzz]) | |
(:gen-class) | |
) | |
(defn FizzBuzz | |
"fizz to the buzz" | |
[] | |
(reify | |
IFizzBuzz | |
(count [this COUNT] | |
(loop [x COUNT] | |
(when (> x 0) | |
(cond (= (mod x 3) 0) (println "Fizz") | |
(= (mod x 5) 0) (println "Buzz") | |
:else (println x)) | |
(recur (- x 1))) | |
) | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment