(monoid op ctor)
Builds a combining fn out of the supplied operator and identity constructor. op must be associative and ctor called with no args must return an identity value for it.
(require '[clojure.core.reducers :as reducers])
(reducers/fold
(reducers/monoid + (constantly 0))
(range 10000))
;; => 49995000
(reducers/fold
(reducers/monoid max (constantly Long/MIN_VALUE))
[1 2 7 10 3 -5])
;; => 10