Skip to content

Instantly share code, notes, and snippets.

@yagays
Created February 25, 2012 08:20
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 yagays/1907324 to your computer and use it in GitHub Desktop.
Save yagays/1907324 to your computer and use it in GitHub Desktop.
(map #(if (zero? (rem % 3))
(if (zero? (rem % 5))
"fizzbuzz"
"fizz")
(if (zero? (rem % 5))
"buzz"
%))
(range 1 101))
(map #(cond (zero? (rem % 15)) "fizzbuzz"
(zero? (rem % 3)) "fizz"
(zero? (rem % 5)) "buzz"
:else %)
(range 1 101))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment