sum method
Returns sum of all elements
Implementation
double sum() {
double total = 0;
for (final element in this) {
total += element;
}
return total;
}
Returns sum of all elements
double sum() {
double total = 0;
for (final element in this) {
total += element;
}
return total;
}