W3cubDocs

/Kotlin

sumByDouble

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
inline fun <T> Array<out T>.sumByDouble(
    selector: (T) -> Double
): Double
inline fun ByteArray.sumByDouble(
    selector: (Byte) -> Double
): Double
inline fun ShortArray.sumByDouble(
    selector: (Short) -> Double
): Double
inline fun IntArray.sumByDouble(
    selector: (Int) -> Double
): Double
inline fun LongArray.sumByDouble(
    selector: (Long) -> Double
): Double
inline fun FloatArray.sumByDouble(
    selector: (Float) -> Double
): Double
inline fun DoubleArray.sumByDouble(
    selector: (Double) -> Double
): Double
inline fun BooleanArray.sumByDouble(
    selector: (Boolean) -> Double
): Double
inline fun CharArray.sumByDouble(
    selector: (Char) -> Double
): Double
@ExperimentalUnsignedTypes inline fun UIntArray.sumByDouble(
    selector: (UInt) -> Double
): Double
@ExperimentalUnsignedTypes inline fun ULongArray.sumByDouble(
    selector: (ULong) -> Double
): Double
@ExperimentalUnsignedTypes inline fun UByteArray.sumByDouble(
    selector: (UByte) -> Double
): Double
@ExperimentalUnsignedTypes inline fun UShortArray.sumByDouble(
    selector: (UShort) -> Double
): Double

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)
inline fun <T> Iterable<T>.sumByDouble(
    selector: (T) -> Double
): Double

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

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/sum-by-double.html