reduce -> fold?

Luís Marques via Digitalmars-d digitalmars-d at
Fri Jan 29 06:05:06 PST 2016

On Friday, 29 January 2016 at 13:56:48 UTC, Dragos Carp wrote:
> But not in python, where "accumulate"[1] is the generic 
> equivalent of C++ "partial_sum"[2]. I like "fold" more.
> BTW this week, a colleague of mine implemented a python 
> "accumulate" in D. Is there any interest to contribute it to 
> Phobos? How should this be named?
> [1] 
> [2]

Fair enough. Yes, that is indeed a useful algorithm, so please do 
contribute. I won't bikeshed on that other name, heh.

More information about the Digitalmars-d mailing list