How come
Enum.map([{:ok, nil}], fn x -> x end)
returns [:ok nil]
instead of [{:ok, nil}]
I thought it might be that it was treating the input as keyword args so I tried:
Enum.map([{:ok, nil}], fn {x, y} -> {x, y} end)
but that returns [:ok, nil]
too. Am I missing something?
And
Enum.map([{:ok, nil}, {:ok, nil}], fn x -> x end)
returns: [ok: nil, ok: nil]
I could work around this using Enum.chunk_every
but I am not sure why it is needed.