Created
June 14, 2014 20:03
-
-
Save daveyarwood/bd31e3ac8608c1f01fa9 to your computer and use it in GitHub Desktop.
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 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