Returns the sum of f applied to each element.
f
num sumBy(num Function(T) f) => fold<num>(0, (acc, e) => acc + f(e));