sum

fun <T> Group<T>.sum(data: Iterable<T>): T

Returns the sum of all elements in the iterable in this Group.

Receiver

the algebra that provides addition.

Return

the sum.

Parameters

data

the iterable to sum up.


fun <T> Group<T>.sum(data: Sequence<T>): T

Returns the sum of all elements in the sequence in this Group.

Receiver

the algebra that provides addition.

Return

the sum.

Parameters

data

the sequence to sum up.