I agree that seqs carry a large degree of risk. You have to work very hard to avoid giving your large sequences a name, lest you accidentally "hang on to the head".
In Clojure's early days, I complained about this and described some of my own experiments with uncached sequences. Rich said he was experimenting with another model for uncached iterator-like constructs, I think he called them streams. As far as I know, none of that has ever made it into Clojure. So I still feel there's a need here that eventually needs to be addressed. Clojure's built-in "range" function (last time I looked) essentially produces an uncached sequence. And that makes a lot of sense. Producing the next value in a range on-demand is way more efficient and practical than caching those values. I think that Clojure programmers should have an easy way to make similarly uncached sequences if that's what they really want/need. (Well, obviously you can drop down into Java and use some of the same tricks that range uses, but I mean it should be easy to do this from within Clojure). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---