Can some one explain why the code below type checks okay with mix dialyzer .
defmodule CHECK do
@type state :: {%{integer => integer},%{}}
@spec a_fun(state) :: state
def a_fun(state) do
{names,other}=state
{Map.put(names,"Hello",4),other}
end
end