RIterableDoubleOps
extensionRIterableDoubleOpsonRIterableOnce<double>
Numeric aggregation operations for RIterableOnce of double.
Methods
product() extension
doubleproduct()
Returns the product of all elements in this list
Available on RIterableOnce<A>, provided by the RIterableDoubleOps extension
Implementation
dart
double product() {
var p = 1.0;
final it = iterator;
while (it.hasNext) {
p *= it.next();
}
return p;
}sum() extension
doublesum()
Returns the sum of all elements in this list
Available on RIterableOnce<A>, provided by the RIterableDoubleOps extension
Implementation
dart
double sum() {
var s = 0.0;
final it = iterator;
while (it.hasNext) {
s += it.next();
}
return s;
}