Hi,

On 3 Nov., 00:40, Rasmus Svensson <r...@lysator.liu.se> wrote:

> I think the problem is that this reduction will build an expression like this:
>
>     (map + ... (map + ... (map + ... (map + ... <one million nesting 
> levels>))))
>
> When clojure tries to realize an element of the resulting lazy seq,
> every level will result in a nested method call, which will eventually
> blow the stack.

Exactly. Much better than my try on an explanation. The doall in my
example realises each sequence as it is created by reduce. Hence this
deep nesting level of calls cannot happen.

Sincerely
Meikel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to