sum method
Returns the sum of all elements.
Example:
[2.0, 6.0, 4.0, 8.0].sum(); // 20.0
Implementation
double sum() => sumByDouble((n) => n);
Returns the sum of all elements.
Example:
[2.0, 6.0, 4.0, 8.0].sum(); // 20.0
double sum() => sumByDouble((n) => n);