Skip to content

Instantly share code, notes, and snippets.

@kcole16
Created March 3, 2015 15:53
Show Gist options
  • Select an option

  • Save kcole16/e761efc6f1064b7cac31 to your computer and use it in GitHub Desktop.

Select an option

Save kcole16/e761efc6f1064b7cac31 to your computer and use it in GitHub Desktop.
Clojure Fizzbuzz
(defn fizzbuzz [start end]
(map
#(if (and (= 0 (mod % 3))(= 0 (mod % 5))) "Fizzbuzz"
(if (= 0 (mod % 3)) "Fizz"
(if (= 0 (mod % 5)) "Buzz" %)))
(range start end)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment