Skip to content

Commit

Permalink
cleaned up fizzbuzz (lol)
Browse files Browse the repository at this point in the history
  • Loading branch information
tedpennings committed Nov 30, 2011
1 parent 7783288 commit f41c60e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/fizzbuzz.clj
@@ -1,10 +1,10 @@
(defn fizzbuzz [] (defn fizzbuzz []
(loop [x 1] (loop [x 1]
(prn x) (print (str x " "))
(if (= 0 (rem x 3)) (if (zero? (mod x 3))
(prn "Fizz")) (print "Fizz"))
(if (= 0 (rem x 5)) (if (zero? (mod x 5))
(prn "Buzz")) (print "Buzz"))
(println) (println) ;only line break printed
(if (< x 100) (if (< x 100)
(recur (inc x))))) (recur (inc x)))))

0 comments on commit f41c60e

Please sign in to comment.