(transduce xform f init ch)
async/reduces a channel with a transformation (xform f).
Returns a channel containing the result. ch must close before
transduce produces a result.
Source
(defn transduce
"async/reduces a channel with a transformation (xform f).
Returns a channel containing the result. ch must close before
transduce produces a result."
[xform f init ch]
(let [f (xform f)]
(go
(let [ret (<! (reduce f init ch))]
(f ret)))))