On Jan 25, 2009, at 6:45 PM, Laurent PETIT wrote:2009/1/26 Stephen C. Gilardi <squee...@mac.com>Both force evaluation. Immediately before either returns, there is a fully realized sequence in memory.Are you sure ? I think the point of dorun is to prevent this case : with dorun, the elements of the sequence can be garbage collected once dorun goes on with the rest of the sequence, thus preventing to blow up the memory.
Right you are! Thanks for the correction. I was recalling the case of "filter" retaining the head even when it wasn't intended to. In reading the code for dorun, I incorrectly concluded that the "coll" argument unavoidably kept the head as well.
Instead, recur takes care of that and dorun works exactly as one might hope.
--Steve
smime.p7s
Description: S/MIME cryptographic signature