Where can I find an explanation of closures on the BEAM

p. 59: Elixir in Action 2e:

A closure always captures a specific memory location.

So the function’s a is bound to the initial memory location. When you change the binding of the outside a to a new memory location the function’s a is still bound to the initial memory location. And the value at that location isn’t going to change due to immutablility.

6 Likes