double sum(double Function(E) sumFun, {double initValue = 0}) { double sum = initValue; for (var item in this) { sum += sumFun(item); } return sum; }