Just to clarify in case anyone gets the wrong idea about Elixir—Elixir data is immutable (you can't modify structures, only make new ones) and variables cannot be reassigned, but Elixir does allow shadowing variable names.
The difference between shadowing and reassignment is significant, because it means that this code outputs "10", not "20":
x = 10
closure = fn () -> x end
x = 20
IO.puts closure.()
# 10
Contrast that with the otherwise equivalent JavaScript: let x = 10;
const closure = () => x;
x = 20
console.log(closure())
// 20
Shadowing allows you the convenience of reusing names without the risk of a variable changing out from under you via spooky action at a distance.