averageEx method
calculates the average of a list based on a selector returns 0 if empty
Implementation
num averageEx(
num selector(T item), {
num resultIfEmpty = 0,
}) {
if (length == 0) return resultIfEmpty;
return this.sumEx(selector) / length;
}