Skip to content

Instantly share code, notes, and snippets.

@daveyarwood
Created June 14, 2014 20:02
Show Gist options
  • Save daveyarwood/6640d5c4c19194d8e214 to your computer and use it in GitHub Desktop.
Save daveyarwood/6640d5c4c19194d8e214 to your computer and use it in GitHub Desktop.
(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