Fitz v0.1.0 Fitz.Enum View Source
Documentation for Fitz.Enum.
Link to this section Summary
Functions
Enum add index. Adds an index to a list and converts it to a map
Examples
Enum add index. Gets all the keys from a list of hashes [maps/keywords_lists]
Examples
Enum add index. Zips a list of lists and converts the results the lists
Examples
Link to this section Functions
Enum add index. Adds an index to a list and converts it to a map
Examples
iex> params = [1,2,3,4,5]
[1,2,3,4,5]
iex> Fitz.Enum.add_index(params)
{0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5}
Enum add index. Gets all the keys from a list of hashes [maps/keywords_lists]
Examples
iex> params = [%{"per_page" => 20, "page_weight" => 50}, %{"page" => 3, "page_weight" => 90}]
[%{"per_page" => 20, "page_weight" => 50}, %{"page" => 3, "page_weight" => 90}]
iex> Fitz.Enum.all_keys(params)
["per_page", "page_weight", "page"]