2015-12-01 10:26 GMT+01:00 Sven Van Caekenberghe <sven@stfx.eu>:
> On 01 Dec 2015, at 10:24, Thierry Goubier <thierry.goubier@gmail.com> wrote:
>
> Note that the sum with #anyOne is wrong.
>
> #(1 2 3 4 5) inject: #(1 2 3 4 5) anyOne into: [ :sum :each | sum + each ]
>
> returns 16 instead of 15.
You have subtract the element you picked with #anyOne !I think he means the suggested implementation for newSum is wrong, just because of this reason.