Re: undocumented one-argument call of reducer

2019-01-25 Thread Alex Miller
The ‘completing’ function can be used to add the missing arity to a reducing function that is missing it. http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/completing -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: undocumented one-argument call of reducer

2019-01-25 Thread James Reeves
The 1-argument form of a reducing function is called at the end of the reduce. So for example: (defn mean "Transducer that returns the mean average." ([] [0 0]) ([[sum count]] (/ sum count)) ([[sum count] value] [(+ sum value) (inc count)) On Fri, 25 Jan 2019 at 22:19, Brian Craft