Programming-Idioms

History of Idiom 54 > diff from v34 to v35

Edit summary for version 35 :
New Kotlin implementation by user [fojji]

Version 34

2019-09-26, 17:41:38

Version 35

2019-09-26, 18:40:56

Idiom #54 Compute sum of integers

Calculate the sum s of integer list x.

Idiom #54 Compute sum of integers

Calculate the sum s of integer list x.

Code
val numbers = listOf(1, 2, 3, 4)
val sum = numbers.sum()