T
Size: a a a
T
IK
T
IK
IK
O
O
JL
D
D
JL
M
LL
iex(12)> %{^{1, x} => y} = %{{1, x} => 2}
** (CompileError) iex:12: invalid argument for unary operator ^, expected an existing variable, got: ^{1, x}
(stdlib 3.12.1) lists.erl:1354: :lists.mapfoldl/3
iex(12)> %{{1, ^x} => y} = %{{1, x} => 2}
** (CompileError) iex:12: cannot use pin operator ^x inside a data structure as a map key in a pattern. The pin operator can only be used as the whole key
(stdlib 3.12.1) lists.erl:1263: :lists.foldl/3
iex(12)> %{{1, x} => y} = %{{1, x} => 2}
** (CompileError) iex:12: cannot use variable x as map key inside a pattern. Map keys in patterns can only be literals (such as atoms, strings, tuples, and the like) or an existing
variable matched with the pin operator (such as ^some_var)
(stdlib 3.12.1) lists.erl:1263: :lists.foldl/3
РП
T
РП
a = {1, x}
%{^a => y} = %{{1, x} => 2}
T
LL
a = {1, x}
%{^a => y} = %{{1, x} => 2}
РП
T