function | since v0.0-1236 | clojure.core.reducers/reduce | Edit |
(reduce f coll)
(reduce f init coll)
Like core/reduce except: When init is not provided, (f) is used. Maps are reduced with reduce-kv
(defn reduce
([f coll] (reduce f (f) coll))
([f init coll]
(if (map? coll)
(-kv-reduce coll f init)
(cond
(nil? coll) init
(array? coll) (#'array-reduce coll f init)
:else (-reduce coll f init)))))