This is all about the terminology, but we seem to confuse reassignment/rebinding and mutation.
a relatively permanent change in hereditary material that involves either a change in chromosome structure or number […]
— https://www.merriam-webster.com/dictionary/mutation
Consider ruby.
a = {foo: 42}
b = a
a = :bar
The above does not mutate anything, b remains {foo: 42}. This is reassignment, not a mutation at all. Here is a mutation.
a = {foo: 42}
b = a
b[:foo] = 3.14159265
Using the proper wording we can easily see that variables in Elixir are indeed immutable.


















