SG
def foo(key, %{key => value}) do
Size: a a a
SG
def foo(key, %{key => value}) do
Е
AB
def foo(key, %{key => value}), do
: valueAB
Е
cannot use variable key as map key inside a pattern. Map keys in patterns can only be literals (such as atoms, strings, tuples, etc) or an existing variable matched with the pin operator (such as ^some_var)
SG
Е
def foo(key, %{key => value}), do
: valueЕ
Е
SG
Е
SG
Е
Е
def foo(key, map) do
%{^key => value} = map
AB
Е
Е
Е
case
AB
Е