https://issues.dlang.org/show_bug.cgi?id=12655
Dmitry Olshansky changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=12655
--- Comment #6 from John Hall ---
This can probably be closed now that D 2.072.0 adds cumulativeFold.
--
https://issues.dlang.org/show_bug.cgi?id=12655
John Hall changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=12655
--- Comment #4 from bearophile_h...@eml.cc ---
(In reply to jens.k.mueller from comment #3)
A cumulate returning the same number elements can be written using map.
...
I leave this here for reference and others to decide whether such a function
https://issues.dlang.org/show_bug.cgi?id=12655
Ivan Kazmenko ga...@mail.ru changed:
What|Removed |Added
CC||ga...@mail.ru
--
https://issues.dlang.org/show_bug.cgi?id=12655
--- Comment #3 from jens.k.muel...@gmx.de ---
A cumulate returning the same number elements can be written using map.
auto cumulate(alias f, R, T)(R r, T seed)
if (isInputRange!R is(T == ElementType!R))
https://issues.dlang.org/show_bug.cgi?id=12655
--- Comment #1 from bearophile_h...@eml.cc ---
Optionally the a+b could be the default operation, like in C++:
[10, 20, 30, 40].foldRange(0)
==
[0, 10, 30, 60, 100]
--
https://issues.dlang.org/show_bug.cgi?id=12655
jens.k.muel...@gmx.de changed:
What|Removed |Added
CC||jens.k.muel...@gmx.de
--- Comment #2