Skip to content

Instantly share code, notes, and snippets.

@daveyarwood
Created June 14, 2014 20:03
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 daveyarwood/bd31e3ac8608c1f01fa9 to your computer and use it in GitHub Desktop.
Save daveyarwood/bd31e3ac8608c1f01fa9 to your computer and use it in GitHub Desktop.
(defn fizz-buzz [n]
(let [s (str (when (zero? (rem n 3)) "Fizz")
(when (zero? (rem n 5)) "Buzz"))]
(if (empty? s) n s)))
(doseq [x (map fizz-buzz (range 1 101))]
(println x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment