Elixir Prelude v0.2.1 Prelude.List

Functions operating on lists.

Summary

Functions

Turns an array into a map with the index as the key

Functions

indexify(list)

Turns an array into a map with the index as the key.

Example:

iex> Prelude.List.indexify(["a", "b"])
%{0 => "a", 1 => "b"}

iex> Prelude.List.indexify([6,7,8])
%{0 => 6, 1 => 7, 2 => 8}