On Mon, Sep 6, 2010 at 9:49 AM, Robert McIntyre <r...@mit.edu> wrote:
> I thought that since into uses reduce, it would be lazy, but I was wrong.
> reduce just plows through everything with a non-lazy recursion.
>
> Why is reduce not lazy?
>
reduce in clojure == foldl in Haskell

and as far as I know, there are very rare use cases for lazy foldl.
The general rule of thumb in Haskell is use foldl'(strict version) or
foldr(lazy). That may explain why reduce is not lazy.

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