Skip to content

Instantly share code, notes, and snippets.

@jneira
Created January 10, 2011 12:47
Show Gist options
  • Save jneira/772738 to your computer and use it in GitHub Desktop.
Save jneira/772738 to your computer and use it in GitHub Desktop.
(defn fizz-buzz [n]
(str (when (zero? (mod n 3)) "fizz")
(when (zero? (mod n 5)) "buzz")))
(defn fizz-buzz [n]
(let [when-div-by
#(when (zero? (mod n %1)) %2)
join str]
(join (when-div-by 3 "fizz")
(when-div-by 5 "buzz"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment