smallex v0.1.6 Lst

List library.

Link to this section Summary

Functions

Calculate frequency of values ftom list

Pad number at zero (string return)

Link to this section Functions

Link to this function frequency(list)

Calculate frequency of values ftom list

Examples

iex> Lst.frequency( [ "abc", "abc", "xyz", "abc", "def", "xyz" ] )
%{ "abc" => 3, "def" => 1, "xyz" => 2 }
iex> Lst.frequency( [ %{ "a" => "abc" }, %{ "a" => "abc" }, %{ "a" => "xyz" }, %{ "a" => "abc" }, %{ "a" => "def" }, %{ "a" => "xyz" } ] )
%{ %{ "a" => "abc"} => 3, %{ "a" => "def" } => 1, %{ "a" => "xyz" } => 2 }

Pad number at zero (string return)

Examples

iex> Lst.to_csv( [ 1, "ab", 8, true ] )
"1, ab, 8, true"