sumBy<T> function

num sumBy<T>(
  1. Iterable<T> list,
  2. num call(
    1. T
    )
)

Implementation

num sumBy<T>(Iterable<T> list, num Function(T) call) {
  return reduce<T>(list, (p0, p1) => p0 + call.call(p1));
}