Skip to content

Instantly share code, notes, and snippets.

@mcandre
Created February 24, 2013 04:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcandre/5022526 to your computer and use it in GitHub Desktop.
Save mcandre/5022526 to your computer and use it in GitHub Desktop.
(ns fizzy
(:gen-class))
(defn fizzy [n]
(cond (= (mod n 15) 0) "FizzBuzz"
(= (mod n 3) 0) "Fizz"
(= (mod n 5) 0) "Buzz"
:else (format "%d" n)))
(defn -main [& args]
(map (comp println fizzy) (range 1 101)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment