Created
August 18, 2012 22:40
-
-
Save marionette-of-u/3390190 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
| (ns org.program.main) | |
| (def fizzbuzz | |
| (map first | |
| (iterate | |
| (fn [[a b]] | |
| [(cond | |
| (= 0 (mod b 15)) "fizzbuzz" | |
| (= 0 (mod b 5)) "buzz" | |
| (= 0 (mod b 3)) "fizz" | |
| :else (str b)) | |
| (inc b)]) ["start!" 1]))) | |
| (defn -main [n] | |
| (take n fizzbuzz)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment