News for hackers. Stuff that matters.
Re:FizzBuzz in ten languages by chrisulloa on Monday December 31, 2018 @11:41AM (#18795339)
Clojure version

  (defn fizzbuzz [x]
    (cond-> nil
      (zero? (mod x 3)) (str "Fizz")
      (zero? (mod x 5)) (str "Buzz")
      :always (or (str x))))

  (doseq [x (range 1 101)] (prn (fizzbuzz x)))

There are no comments on this comment yet.