Enumerable.count
You're seeing just the function
count
, go back to Enumerable module for more information.
Specs
count(t()) :: {:ok, non_neg_integer()} | {:error, module()}
Retrieves the number of elements in the enumerable
.
It should return {:ok, count}
if you can count the number of elements
in enumerable
without traversing it.
Otherwise it should return {:error, __MODULE__}
and a default algorithm
built on top of reduce/3
that runs in linear time will be used.