Skip to content

Instantly share code, notes, and snippets.

@anon767
Last active August 6, 2017 14:43
Show Gist options
  • Save anon767/19e9b4f2aa7db6eeff10adb8163ae954 to your computer and use it in GitHub Desktop.
Save anon767/19e9b4f2aa7db6eeff10adb8163ae954 to your computer and use it in GitHub Desktop.
(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