Try the revamped Kotlin docs design →
Try the revamped Kotlin docs design!
sumBy
@DeprecatedSinceKotlin("1.5") inline fun <T> Array<out T>.sumBy(
selector: (T) -> Int
): Int
(source)
Deprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun ByteArray.sumBy(
selector: (Byte) -> Int
): Int
(source)
Deprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun ShortArray.sumBy(
selector: (Short) -> Int
): Int
(source)
Deprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun IntArray.sumBy(
selector: (Int) -> Int
): Int
(source)
Deprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun LongArray.sumBy(
selector: (Long) -> Int
): Int
(source)
Deprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun FloatArray.sumBy(
selector: (Float) -> Int
): Int
(source)
Deprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun DoubleArray.sumBy(
selector: (Double) -> Int
): Int
(source)
Deprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun BooleanArray.sumBy(
selector: (Boolean) -> Int
): Int
(source)
Deprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun CharArray.sumBy(
selector: (Char) -> Int
): Int
(source)
Deprecated: Use sumOf instead.
Deprecated: Use sumOf instead.
Deprecated: Use sumOf instead.
Deprecated: Use sumOf instead.
Deprecated: Use sumOf instead.
Returns the sum of all values produced by selector function applied to each element in the array.
@DeprecatedSinceKotlin("1.5") inline fun <T> Iterable<T>.sumBy(
selector: (T) -> Int
): Int
(source)
Deprecated: Use sumOf instead.
Returns the sum of all values produced by selector function applied to each element in the collection.