Logo

Programming-Idioms

History of Idiom 117 > diff from v49 to v50

Edit summary for version 50 by programming-idioms.org:
[Elixir] 404

Version 49

2019-10-14, 12:28:09

Version 50

2020-05-10, 21:44:29

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
Variables
n,x
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
https://hexdocs.pm/elixir/Enum.html#count/1