Lazy sequences are more lazy. In particular, expanding transformations (most commonly mapcat) will produce elements that are consumed as needed in a lazy sequence. In a transducer the entire expansion will get produced when it's encountered and then doled out to one by one. So intermediate operations in transducers are never lazy.
In practical terms, most of the time this makes no difference, but you can certainly construct cases where it is doing more work before you expect it. For example: (mapcat range (range 100 110)) Will produce elements lazily as you need them (ignoring chunking for the moment which puts this to a bit of a lie - but imagine the intermediate range to be something that expensively computes many elements). Consuming 5 elements from the sequence would cause 5 elements to be computed in the middle. However consuming 5 elements from this: (sequence (mapcat range) (range 100 110)) will cause the first mapcat to compute all 100 elements and just return 5. For many transformations this is not important, but if maximum laziness is necessary than lazy seqs will still be useful to you here. -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.