product method

double product()

Returns the product of this Iterable.

Example: [-2, 2.5].product() returns -5.

Implementation

double product() {
  var product = 1.0;
  for (final value in this) {
    product *= value;
  }
  return product;
}