(completing f)
(completing f cf)
Takes a reducing function f of 2 args and returns a fn suitable for
transduce by adding an arity-1 signature that calls cf (default -
identity) on the result argument.
Source
(defn
completing
"Takes a reducing function f of 2 args and returns a fn suitable for\n transduce by adding an arity-1 signature that calls cf (default -\n identity) on the result argument."
([f] (completing f identity))
([f cf] (fn ([] (f)) ([x] (cf x)) ([x y] (f x y)))))