On Sun, 5 Nov 2023 17:40:29 GMT, Tagir F. Valeev <tval...@openjdk.org> wrote:
>> Viktor Klang has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Addressing review feedback >> - Make Gatherer.andThen take a wildcard for the rhs Gatherer state type > > src/java.base/share/classes/java/util/stream/Gatherers.java line 426: > >> 424: * transformation for scenarios where no combiner-function can be >> 425: * implemented, or for reductions which are intrinsically >> 426: * order-dependent. > > I think, we should highlight the most important difference between `fold` and > `reduce`: `reduce` must provide an associative function, while `fold` does > not require this restriction. Please take a look here, probably this comment was overlooked? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1387735052