Skip to content

Instantly share code, notes, and snippets.

@stuhacking
Created January 22, 2014 13:58
Show Gist options
  • Save stuhacking/8559158 to your computer and use it in GitHub Desktop.
Save stuhacking/8559158 to your computer and use it in GitHub Desktop.
(defn fizzbuzz [n]
(cond (zero? (rem n 15)) "FizzBuzz"
(zero? (rem n 5)) "Buzz"
(zero? (rem n 3)) "Fizz"
:else n))
(def fizzbuzz-seq
(for [x (iterate inc 1)]
(fizzbuzz x)))
(defn main []
(doseq [x (take 100 fizzbuzz-seq)]
(println x)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment