Skip to content

Instantly share code, notes, and snippets.

@jmorton
Created January 11, 2013 16:28
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 jmorton/4512013 to your computer and use it in GitHub Desktop.
Save jmorton/4512013 to your computer and use it in GitHub Desktop.
I know it's silly....
(defn fizzer [n]
(if (= 0 (mod n 3)) "Fizz"))
(defn buzzer [n]
(if (= 0 (mod n 5)) "Buzz"))
(defn fizzerbuzzer [num]
(let [res [(fizzer num) (buzzer num)]]
(if (every? nil? res) num (apply str res))))
(prn (map #(fizzerbuzzer %) (range 1 20)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment