sum



@PerformancePitfall(message = "Potential boxing access to buffer elements")
fun <T> Group<T>.sum(data: Buffer<T>): T(source)
fun <T> Group<T>.sum(data: Iterable<T>): T(source)

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(source)

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.