Logo

Programming-Idioms

History of Idiom 54 > diff from v10 to v11

Edit summary for version 11 by :

Version 10

2015-09-03, 16:00:00

Version 11

2015-09-04, 10:57:25

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 = Enum.sum(x)
Doc URL
http://elixir-lang.org/docs/v1.0/elixir/Enum.html#sum/1
Demo URL
http://play.elixirbyexample.com/s/83caeb19b2