Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Created October 5, 2009 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/202421 to your computer and use it in GitHub Desktop.
Save anonymous/202421 to your computer and use it in GitHub Desktop.
(defn fizzbuzz
[from to]
(map
#(let [ fb [(zero? (mod % 3)) (zero? (mod % 5))]]
(condp = fb
[true true] "FizzBuzz"
[true false] "Fizz"
[false true] "Buzz"
%))
(range from to)))
(println (fizzbuzz 1 101))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment