function | since v0.0-2341 | clojure.core/completing | Edit |
(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.
(defn completing
([f] (completing f identity))
([f cf]
(fn
([] (f))
([x] (cf x))
([x y] (f x y)))))