sum

@JvmName(name = "sumOfByte")
fun ByteArray.sum(): Int(source)
@JvmName(name = "sumOfShort")
fun ShortArray.sum(): Int(source)
@JvmName(name = "sumOfInt")
fun IntArray.sum(): Int(source)
@JvmName(name = "sumOfLong")
fun LongArray.sum(): Long(source)
@JvmName(name = "sumOfFloat")
fun FloatArray.sum(): Float(source)
@JvmName(name = "sumOfDouble")
fun DoubleArray.sum(): Double(source)

Returns the sum of all elements in the array.

Since Kotlin

1.0

@JvmName(name = "sumOfByte")
fun Iterable<Byte>.sum(): Int(source)
@JvmName(name = "sumOfShort")
fun Iterable<Short>.sum(): Int(source)
@JvmName(name = "sumOfInt")
fun Iterable<Int>.sum(): Int(source)
@JvmName(name = "sumOfLong")
fun Iterable<Long>.sum(): Long(source)
@JvmName(name = "sumOfFloat")
fun Iterable<Float>.sum(): Float(source)
@JvmName(name = "sumOfDouble")
fun Iterable<Double>.sum(): Double(source)

Returns the sum of all elements in the collection.

Since Kotlin

1.0