then, back to my original question.
They (dorun do all) differe ONLY in return value.
Then how come one forces eval and the other not?

-sun


On Jan 25, 7:18 pm, "Stephen C. Gilardi" <squee...@mac.com> wrote:
> > 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
> 3KViewDownload
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to