On Wed, Feb 19, 2014 at 1:29 PM, Bienlein <[email protected]> wrote:
> There is the nice old Smalltalk-80 inject:into: method in the Collection
> class:

> A little more general ;-). The Scala guys have also cloned it where it is
> called foldLeft.

Oh, but D has `reduce`, for years now. It was maybe one of the very
first range algorithms to be put into Phobos, with map and filter. So
we have generality already :-)

What bearophile wanted was, on the contrary, to have a
specialized-for-summing function, if only to make the intended
behavior more clear.

Reply via email to