Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7783288
commit f41c60e
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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))))) |