(rontolisp) docs
← Seqs

reduce

(reduce f coll) / (reduce f val coll)

Folds f over the seq view of coll, left to right, one element at a time, so a lazy input reduces whole. The 3-arity takes the Clojure argument order -- function, initial value, collection; the 2-arity folds with no seed, answering (f) of an empty collection and the lone member of a one-member one. A reduced answer stops the fold and answers its value.