sum

TODO Issue 4725: Remove when sum is standard in Phobos.

@safe pure nothrow
sum
(
Range
SumType = ElementType!Range
)
(
Range range
)
if (
isInputRange!Range
)

Examples

assert([1, 2, 3, 4].sum == 10); 

See Also

Meta