sumWithGroupOf

inline fun <T, R> Iterable<T>.sumWithGroupOf(group: Group<R>, extractor: (T) -> R): R(source)

Sum extracted elements of Iterable with given group

Receiver

the collection to sum up.

Parameters

group

tha algebra that provides addition

extractor

the (inline) lambda function to extract value