average property

Coral<double> get average

Returns the average of the elements in this collection.

Implementation

Coral<double> get average => coral.map((source) {
      if (source.isEmpty) throw StateError('No element');
      return source.average;
    });