Created
June 14, 2014 20:02
-
-
Save daveyarwood/6640d5c4c19194d8e214 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
(def fizz-buzz | |
(->> (map vector (range 1 101) (repeat 100 "")) | |
(map (fn [[i s]] [i (if (zero? (rem i 3)) (str s "Fizz") s)])) | |
(map (fn [[i s]] [i (if (zero? (rem i 5)) (str s "Buzz") s)])) | |
(map (fn [[i s]] (if (= "" s) i s))))) | |
(doseq [x fizz-buzz] (println x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment