On Tue, Jun 14, 2022 at 7:41 AM Marc Nieper-Wißkirchen <xxxxxx@gmail.com> wrote:

Sometimes, you have an algebraic structure that has an associative operation with a unit, and sometimes one that has an associative operation without a unit.  The code should reflect this.  So there's a use case for fold and for reduce and it makes a lot of sense to have both.

For linearizable data structures you can define reduce using fold and pop.  Pop doesn't make sense for arrays, though.