sum method

T sum()

Calculates the sum of all values. This only works for numeric values.

Implementation

T sum() => aggregate(Aggregation.sum)!;