Logo

Programming-Idioms

History of Idiom 117 > diff from v31 to v32

Edit summary for version 32 by programming-idioms.org:
[Elixir] +DemoURL

Version 31

2016-11-27, 14:37:18

Version 32

2016-11-30, 20:22:55

Idiom #117 Get list size

Set n to the number of elements of list x.

Illustration

Idiom #117 Get list size

Set n to the number of elements of list x.

Illustration
Extra Keywords
length
Extra Keywords
length
Code
n = Enum.count(x)
Code
n = Enum.count(x)
Doc URL
http://elixir-lang.org/docs/stable/elixir/Enum.html#count/1
Doc URL
http://elixir-lang.org/docs/stable/elixir/Enum.html#count/1
Demo URL
http://play.elixirbyexample.com/s/dbaf51c436