Skip to content

Instantly share code, notes, and snippets.

@moserrya
Last active December 28, 2015 02:19
Show Gist options
  • Save moserrya/7427008 to your computer and use it in GitHub Desktop.
Save moserrya/7427008 to your computer and use it in GitHub Desktop.
(defn to-fizzword [number]
(let [fizzword (str (if (zero? (mod number 3)) "Fizz")
(if (zero? (mod number 5)) "Buzz"))]
(if (empty? fizzword) number fizzword)))
(defn fizzbuzz [largest]
(map to-fizzword (range 1 (inc largest))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment