sumBy<T> function
Returns the sum using an accessor function.
Implementation
num sumBy<T>(Iterable<T> iterable, num Function(T) accessor) {
num total = 0;
for (final item in iterable) {
total += accessor(item);
}
return total;
}