elixir enum map with last element code example
Example 1: filter elixir enum example
# filter, sum
[1.0,2.0,nil] |> Enum.filter(&(&1|>is_float))|> Enum.sum
# map
0..0 |> Enum.map(&(&1+1))
Example 2: enum reject
Enum.reject([1, 2, 3], fn x -> rem(x, 2) == 0 end)
[1, 3]