sum

Common
JVM
JS
Native
1.0
@JvmName("sumOfByte") fun Sequence<Byte>.sum(): Int
@JvmName("sumOfShort") fun Sequence<Short>.sum(): Int
@JvmName("sumOfInt") fun Sequence<Int>.sum(): Int
@JvmName("sumOfLong") fun Sequence<Long>.sum(): Long
@JvmName("sumOfFloat") fun Sequence<Float>.sum(): Float
@JvmName("sumOfDouble") fun Sequence<Double>.sum(): Double

Returns the sum of all elements in the sequence.

The operation is terminal.