Logo

Programming-Idioms

History of Idiom 117 > diff from v48 to v49

Edit summary for version 49 by programming-idioms.org:
[Elixir] Dead link: play.elixirbyexample.com has been down for a while

Version 48

2019-09-30, 19:35:52

Version 49

2019-10-14, 12:28:09

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