Enum.count
You're seeing just the function
count
, go back to Enum module for more information.
Specs
count(t()) :: non_neg_integer()
Returns the size of the enumerable
.
Examples
iex> Enum.count([1, 2, 3])
3
Specs
count(t(), (element() -> as_boolean(term()))) :: non_neg_integer()
Returns the count of elements in the enumerable
for which fun
returns
a truthy value.
Examples
iex> Enum.count([1, 2, 3, 4, 5], fn x -> rem(x, 2) == 0 end)
2