Created
January 22, 2014 13:58
-
-
Save stuhacking/8559158 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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