Hi, On Jan 28, 2:33 pm, Michał Marczyk <michal.marc...@gmail.com> wrote:
> However, the original "less elegant" version with the fix I proposed > alongside the reduce-based version is actually better. (Which I've > only noticed after posting it -- sorry for the confusion.) With the "elegant" version you pile lazy-cat on lazy-cat on lazy-cat because lazy-cat does delay the evaluation just a lazy-seq does. So when accessing the sequencing you have to handle all those lazy-cat calls on the stack, which will eventually overflow. With the direct call you have the same situation as with lazy-seq: the original call already returned and the stack is not blown. 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