function | since v0.0-1236 | clojure.core.reducers/folder | Edit |
(folder coll xf)
Given a foldable collection, and a transformation function xf, returns a foldable collection, where any supplied reducing fn will be transformed by xf. xf is a function of reducing fn to reducing fn.
(defn folder
([coll xf]
(reify
cljs.core/IReduce
(-reduce [_ f1]
(-reduce coll (xf f1) (f1)))
(-reduce [_ f1 init]
(-reduce coll (xf f1) init))
CollFold
(coll-fold [_ n combinef reducef]
(coll-fold coll n combinef (xf reducef))))))