1 min readNov 19, 2017
Original line 7 was the key…
7> f(A).
A
in line 8 is not the same A
in line 3.
I should not have done that. The proper way of presenting the example would’ve been…
4> A = #{b => 3} #{b => 4}.
#{b => 4}
5> A.
#{b => 4}
6> (A = #{b => 3}) #{b => 4}.
** exception error: no match of right hand side value #{b => 3}
8> B = (C = #{b => 3}) #{b := 4}.
#{b => 4}
9> C.
#{b => 3}
10> B.
#{b => 4}
That way it’s clearer that the matching of B
happens outside the parentheses and therefore #{b := 4}
is applied to the map and B
ends up being bound to #{b => 4}
while C
doesn’t.