sumByLong

inline fun <T> Iterable<T>.sumByLong(selector: (T) -> Long): Long

Returns the sum of all values produced by selector function applied to each element in the collection.


inline fun <T> Sequence<T>.sumByLong(selector: (T) -> Long): Long

Returns the sum of all values produced by selector function applied to each element in the sequence.

The operation is terminal.

Sources

Link copied to clipboard
Link copied to clipboard