aveBy<T> function

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

Implementation

num aveBy<T>(Iterable<T> list, num Function(T) call) {
  if (list.isEmpty) {
    return 0;
  }
  return sumBy<T>(list, call) / list.length;
}