Last active
August 29, 2015 14:04
-
-
Save ysasaki/2299119ebfa9e0d3fc4a 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 fizzbuzz.core) | |
(defn fizzbuzz | |
[end] | |
(map | |
#(cond | |
(= (mod % 15) 0) "FizzBuzz" | |
(= (mod % 5) 0) "Buzz" | |
(= (mod % 3) 0) "Fizz" | |
:else (str %)) (range 1 end))) | |
(defn -main [] | |
(println (fizzbuzz 100))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment