
If you assume the variable
a
initially contains the value2
, which of the following will match?[ a, b, a ] = [ 1, 2, 3 ]
[ a, b, a ] = [ 1, 1, 2 ]
a = 1
^a = 2
^a = 1
^a = 2  a
A Possible Solution</summary>
a = 2 #=> a → 2
[ a, b, a ] = [ 1, 2, 3 ]
# ** (MatchError) no match of right hand side value: [1, 2, 3]
# :erl_eval.expr/3
[ a, b, a ] = [ 1, 1, 2 ]
# ** (MatchError) no match of right hand side value: [1, 1, 2]
# :erl_eval.expr/3
a = 1 #=> a → 1
^a = 2
# ** (MatchError) no match of right hand side value: 2
# :erl_eval.expr/3
^a = 1 #=> matches. a still 1
^a = 2  a #=> matches. a still 1
</details>
a = 2 #=> a → 2 [ a, b, a ] = [ 1, 2, 3 ] # ** (MatchError) no match of right hand side value: [1, 2, 3] # :erl_eval.expr/3 [ a, b, a ] = [ 1, 1, 2 ] # ** (MatchError) no match of right hand side value: [1, 1, 2] # :erl_eval.expr/3 a = 1 #=> a → 1 ^a = 2 # ** (MatchError) no match of right hand side value: 2 # :erl_eval.expr/3 ^a = 1 #=> matches. a still 1 ^a = 2  a #=> matches. a still 1