Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR ELIXIR

elixir enum map

iex> Enum.map(1..3, fn x -> x * 2 end)
[2, 4, 6]

iex> map = %{"a" => 1, "b" => 2}
iex> Enum.map(map, fn {k, v} -> {k, v * 2} end)
[{"a", 2}, {"b", 4}]
Source by hexdocs.pm #
 
PREVIOUS NEXT
Tagged: #elixir #enum #map
ADD COMMENT
Topic
Name
2+2 =