No init value given with transduce uses the zero arity value of f rather than the zero arity of the reducing function through xform:
With Clojure 1.7.0-alpha2: user=> (doc transduce) ------------------------- clojure.core/transduce ([xform f coll] [xform f init coll]) reduce with a transformation of f (xf). If init is not supplied, (f) will be called to produce it. user=> (transduce println-transducing-fn + [1 2]) two arity two arity one arity 3 user=> (transduce println-transducing-fn + []) one arity 0 On Tuesday, September 16, 2014 7:48:51 PM UTC+2, Ghadi Shayban wrote: > > Call 'transduce without an init value, and it will use the 0-arity return > as init. Same for reduce but in different scenarios (some > IReduce/CollReduce collections) -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.