Logo

Programming-Idioms

History of Idiom 54 > diff from v28 to v29

Edit summary for version 29 by Debaran:
[Scala] Fixed var s not defined

Version 28

2019-02-01, 06:29:30

Version 29

2019-02-01, 06:30:00

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
s = x.sum()
Code
val s = x.sum()