Skip to content

Instantly share code, notes, and snippets.

@fgaray
Created May 19, 2013 00:21
Show Gist options
  • Save fgaray/5606199 to your computer and use it in GitHub Desktop.
Save fgaray/5606199 to your computer and use it in GitHub Desktop.
(defn fizzbuzz
[]
(letfn [(fizzbuzz'
[n]
(cond
(= (mod n 15) 0) "FizzBuzz"
(= (mod n 3) 0) "Fizz"
(= (mod n 5) 0) "Buzz"
:else n))]
(map fizzbuzz' (range 1 100))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment