That works in this way, because this a closure to previous value. I think a different topic in respect to re-binding. It isn’t?
I guess you are right, it is actually about scope. But it generally helps to understand how variables behave in Elixir.
Also how can I have the pointer to old values (for other processes, for example). I think I can not.
You cannot, unless of course you keep a variable bound to it. Processes do not share memory (with a few exceptions), so if you pass a value to another process the value be copied to the other process own memory space.
That means that there is a new memory cell occupation for the new value.
As @hauleth said values can be reused but also values like the first a in basic code like a = 1; do_stuff(a); a = 2 will typically only exist on the stack as they are short lived.






















