averageIterable<I, R> function

num? averageIterable<I, R>(
  1. Iterable<num> iterable
)

Calculate the average value of iterable.

Implementation

num? averageIterable<I, R>(Iterable<num> iterable) =>
    iterable.isEmpty ? null : sumIterable(iterable) / iterable.length;