Skip to content

Instantly share code, notes, and snippets.

@marionette-of-u
Created August 18, 2012 22:40
Show Gist options
  • Select an option

  • Save marionette-of-u/3390190 to your computer and use it in GitHub Desktop.

Select an option

Save marionette-of-u/3390190 to your computer and use it in GitHub Desktop.
(ns org.program.main)
(def fizzbuzz
(map first
(iterate
(fn [[a b]]
[(cond
(= 0 (mod b 15)) "fizzbuzz"
(= 0 (mod b 5)) "buzz"
(= 0 (mod b 3)) "fizz"
:else (str b))
(inc b)]) ["start!" 1])))
(defn -main [n]
(take n fizzbuzz))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment