Hi,

Am Mittwoch, 13. Juli 2011 16:15:28 UTC+2 schrieb Sebastián Galkin:
>
> > Making assumptions between the order of realization of seq elements and 
> calls to the reducing functions seems crazy to me, really. 
>
> May be, but it's not as much about the order as about the laziness. New 
> reduce is less lazy than previous, and maybe unnecessarily so. If you think 
> of a collection, you don't care, since is going to be completely reduced 
> anyway, but if your seq is a lazy-seq, you want as much laziness as you can 
> have. 
>

reduce is always eager and will consume the total sequence. At what point in 
time it realises the elements is mood in the end, unless two elements of 
your seq won't fit in memory at the same time (or you got side-effects...). 
So, I still think reduce shouldn't do that, although hitting a case 
triggering this issue is rather unlikely in practise.

But why rely on unlikeliness when one can easily fix this?

Sincerely
Meikel

-- 
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

Reply via email to