Enum.frequencies
You're seeing just the function
frequencies
, go back to Enum module for more information.
Specs
Returns a map with keys as unique elements of enumerable
and values
as the count of every element.
Examples
iex> Enum.frequencies(~w{ant buffalo ant ant buffalo dingo})
%{"ant" => 3, "buffalo" => 2, "dingo" => 1}