seq-reduce

seq-reduce is a compiled Lisp function in `seq.el'.

(seq-reduce FUNCTION SEQ INITIAL-VALUE)

Reduce the function FUNCTION across SEQ, starting with INITIAL-VALUE.

Return the result of calling FUNCTION with INITIAL-VALUE and the
first element of SEQ, then calling FUNCTION with that result and
the second element of SEQ, then with that result and the third
element of SEQ, etc.

If SEQ is empty, return INITIAL-VALUE and FUNCTION is not called.