sumBy method Null safety

double sumBy(
  1. double toDouble(
    1. T t
    )
)

Implementation

double sumBy(double toDouble(T t)) {
  return this.map(toDouble).sum();
}