- reduce proc seed collection ...procedure
Folds over the collections in step. proc receives one element of each collection followed by the value accumulated so far, which starts as seed; the result of the last call is returned.
> (reduce + 0 (f64vector 1.0 2.0 3.5)) 6.5 > (reduce (lambda (x y sum) (+ sum (* x y))) 0 '(1 2 3) #(4 5 6)) 32