Skip to content

Instantly share code, notes, and snippets.

@otofu-square
Last active June 30, 2017 08:10
Show Gist options
  • Save otofu-square/b24d6f7edf812410becd39831c2d1979 to your computer and use it in GitHub Desktop.
Save otofu-square/b24d6f7edf812410becd39831c2d1979 to your computer and use it in GitHub Desktop.
Fizzbuzz in clojure
(defn fizzbuzz
[n]
(cond
(and (= (rem n 3) 0) (= (rem n 5) 0)) "fizzbuzz"
(= (rem n 5) 0) "buzz"
(= (rem n 3) 0) "fizz"
:else (.toString n)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment