Re: printing deeply nested things

2009-01-22 Thread Stuart Halloway
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

printing deeply nested things

2009-01-21 Thread Stuart Halloway
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) -