Created
December 19, 2019 00:01
-
-
Save lucian303/f404bbdd0274d8c34c7088a3745b7078 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 fizz-buzz | |
[num] | |
(cond | |
(and | |
(= (mod num 3) 0) | |
(= (mod num 5) 0)) "FizzBuzz" | |
(= (mod num 3) 0) "Fizz" | |
(= (mod num 5) 0) "Buzz" | |
:else num)) | |
(map fizz-buzz (range 1 101)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment