Recent improvements

Philippe Sigaud philippe.sigaud at gmail.com
Wed Feb 19 04:42:40 PST 2014


On Wed, Feb 19, 2014 at 1:29 PM, Bienlein <jeti789 at web.de> 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.


More information about the Digitalmars-d mailing list