Created
January 11, 2013 16:28
-
-
Save jmorton/4512013 to your computer and use it in GitHub Desktop.
I know it's silly....
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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