averageWith

fun <T> Iterable<T>.averageWith(space: Space<T>): T

Returns an average value of elements in the iterable in this Space.

Return

the average value.

Author

Iaroslav Postovalov

Parameters

<receiver>

the iterable to find average.

space

the algebra that provides addition and division.

fun <T> Sequence<T>.averageWith(space: Space<T>): T

Returns an average value of elements in the sequence in this Space.

Return

the average value.

Author

Iaroslav Postovalov

Parameters

<receiver>

the sequence to find average.

space

the algebra that provides addition and division.