Try the revamped Kotlin docs design →
Try the revamped Kotlin docs design!
sum
@JvmName("sumOfByte") fun Array<out Byte>.sum(): Int
(source)
@JvmName("sumOfShort") fun Array<out Short>.sum(): Int
(source)
@JvmName("sumOfInt") fun Array<out Int>.sum(): Int
(source)
@JvmName("sumOfLong") fun Array<out Long>.sum(): Long
(source)
@JvmName("sumOfFloat") fun Array<out Float>.sum(): Float
(source)
@JvmName("sumOfDouble") fun Array<out Double>.sum(): Double
(source)
Returns the sum of all elements in the array.
Returns the sum of all elements in the collection.