I think "injectMany" would be a good addition.
It looks like a useful feature and it's important to keep up with the
features added in Java.
Some silly brainstorming for method name:
injectAccumulate (or injectAcc)
injectAll
/Mattias
Den tis 25 mars 2025 kl 13:30 skrev Paul King :
> Hi folks,
>
Hi folks,
JDK24 brought with it the Gatherers API for enhanced stream processing.
In traditional streams, we have the normal reduce operators, e.g.:
var nums = 1..3
assert nums.stream().reduce('', (String string, number) -> string +
number) == '123'
Groovy supports this for collections using "i