average<U extends num> method

double average<U extends num>([
  1. TFuncMapper<T, U>? funcMapper
])

Implementation

double average<U extends num>([ TFuncMapper<T, U>? funcMapper ]) {
	if (this.isEmpty) {
		return 0;
	}

	U sum = this.sum(funcMapper);
	return sum / this.length;
}