Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Code in Chapter 3 #191

Open
hkopp opened this issue Feb 26, 2020 · 1 comment
Open

Error in Code in Chapter 3 #191

hkopp opened this issue Feb 26, 2020 · 1 comment

Comments

@hkopp
Copy link

hkopp commented Feb 26, 2020

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.

@hkopp
Copy link
Author

hkopp commented Feb 26, 2020

Sorry for the shitty formatting.

hkopp added a commit to hkopp/brave-clojure-web that referenced this issue Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant