sumBy (original) (raw)

inline fun <T> Sequence<T>.sumBy(selector: (T) -> Int): Int(source)

Deprecated

Warning since 1.5

Use sumOf instead.

Replace with

this.sumOf(selector)

Content copied to clipboard

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

The operation is terminal.

Since Kotlin

1.0