Hi Rich,
It is a small real problem: in the book I demonstrate an incorrect,
stack-consuming recursion that blows up on a deeply nested structure.
When the recursion is fixed, it *still* blows up because the REPL
cannot print it, so I introduce *print-level*.
I don't think printing super-d
On Jan 21, 8:43 pm, Stuart Halloway wrote:
> Consider the function deeply-nested:
>
> (defn deeply-nested [n]
>(loop [n n
> result [:bottom]]
> (if (= n 0)
>result
>(recur (dec n) [result]
>
> If you print it at the REPL for small values of n, no problem:
>
Consider the function deeply-nested:
(defn deeply-nested [n]
(loop [n n
result [:bottom]]
(if (= n 0)
result
(recur (dec n) [result]
If you print it at the REPL for small values of n, no problem:
(deeply-nested 25)
-> [[:bottom]