[Issue 10670] std.algorithm.reduce: no-seed initialization wrong design
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 21 13:58:46 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=10670
--- Comment #7 from monarchdodra at gmail.com 2014-02-21 13:58:38 PST ---
(In reply to comment #6)
> I understand. I suggest to introduce a new function named like your "fold" and
> slowly deprecate "reduce".
Done.
https://github.com/D-Programming-Language/phobos/pull/1955
"fold" will use T.init, and "fold1" will use the front explicity:
[1, 1].fold!"a + 2 * b".fold() => 4
[1, 1].fold!"a + 2 * b".fold1() => 3
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list