[Issue 12173] Optional start value for std.algorithm.sum
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 15 06:29:16 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12173
--- Comment #2 from bearophile_hugs at eml.cc 2014-02-15 06:29:14 PST ---
(In reply to comment #1)
> Doesn't an add outside the sum call do the same?
An add outside the sum doesn't solve the problem with Foo.
Another example:
long[] data = [...];
immutable total = data.sum(0.BigInt);
If the longs are large enough this gives the correct result, unlike summing
with longs.
--
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