brave-clojure-web
brave-clojure-web copied to clipboard
Error in Code in Chapter 3
When loop is explained, there is the following code:
(defn recursive-printer ([] (recursive-printer 0)) ([iteration] (println iteration) (if (> iteration 3) (println "Goodbye!") (recursive-printer (inc iteration))))) (recursive-printer) ; => Iteration 0 ; => Iteration 1 ; => Iteration 2 ; => Iteration 3 ; => Iteration 4 ; => Goodbye!
This code is wrong, as the word "Iteration" is not printed. Just the numbers.
Sorry for the shitty formatting.