On Feb 3, 11:09 pm, Rich Hickey <richhic...@gmail.com> wrote:
> On Feb 3, 4:43 pm, Anand Patil <anand.prabhakar.pa...@gmail.com>
> wrote:

> No, it's not. as the docs for preduce say:http://clojure.org/api#preduce
>
> "Also note that (f base an-element) might be performed many times"
>
> in fact, an arbitrary number of times depending on how many parallel
> tasks are fired up. So, the function with base value should produce an
> identity, e.g. (+ 0 x) and (* 1 x), and your q with 0 does not.

Ah, thanks. I interpreted the docs as meaning preduce might do this:

(q (q (q 2 0) (q 3 0)) (q 1 0))

meaning (f base an-element) is performed many times, but just once per
an-element. I didn't understand that f with base needed to be an
identity.

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