Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels