Created
March 3, 2015 15:53
-
-
Save kcole16/e761efc6f1064b7cac31 to your computer and use it in GitHub Desktop.
Clojure Fizzbuzz
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 [start end] | |
| (map | |
| #(if (and (= 0 (mod % 3))(= 0 (mod % 5))) "Fizzbuzz" | |
| (if (= 0 (mod % 3)) "Fizz" | |
| (if (= 0 (mod % 5)) "Buzz" %))) | |
| (range start end) | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment