sumBy
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
@DeprecatedSinceKotlin("1.5") inline fun <T> Array<out T>.sumBy( selector: (T) -> Int ): IntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun ByteArray.sumBy( selector: (Byte) -> Int ): IntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun ShortArray.sumBy( selector: (Short) -> Int ): IntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun IntArray.sumBy( selector: (Int) -> Int ): IntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun LongArray.sumBy( selector: (Long) -> Int ): IntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun FloatArray.sumBy( selector: (Float) -> Int ): IntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun DoubleArray.sumBy( selector: (Double) -> Int ): IntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun BooleanArray.sumBy( selector: (Boolean) -> Int ): IntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") inline fun CharArray.sumBy( selector: (Char) -> Int ): IntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") @ExperimentalUnsignedTypes inline fun UIntArray.sumBy( selector: (UInt) -> UInt ): UIntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") @ExperimentalUnsignedTypes inline fun ULongArray.sumBy( selector: (ULong) -> UInt ): UIntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") @ExperimentalUnsignedTypes inline fun UByteArray.sumBy( selector: (UByte) -> UInt ): UIntDeprecated: Use sumOf instead.
@DeprecatedSinceKotlin("1.5") @ExperimentalUnsignedTypes inline fun UShortArray.sumBy( selector: (UShort) -> UInt ): UIntDeprecated: Use sumOf instead.
Returns the sum of all values produced by selector function applied to each element in the array.
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
@DeprecatedSinceKotlin("1.5") inline fun <T> Iterable<T>.sumBy( selector: (T) -> Int ): IntDeprecated: Use sumOf instead.
Returns the sum of all values produced by selector function applied to each element in the collection.
© 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/sum-by.html