Hi, I noticed that while map produces a fully lazy result, mapcat always evaluates the first three terms when it is called, and is lazy thereafter. This can be confusing, and is sometimes not desired behavior. For example, I'm trying to generate a lazy infinite seq corresponding to a tree traversal by interleaving mapcat and recursive calls, and these extra evaluations cause a stack overflow before a single element is produced.
In addition to a lazy mapcat, it might be nice to have a truly lazy variant of concat itself built-in. I know lazy-cat exists, but it is a macro so the number of seqs must be known at compile-time (correct?). Perhaps most useful would be a function that takes a lazy seq of lazy seqs, and returns their supremely lazy concatenation. Thanks! Jason --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---