Enum.map 1..100, fn _ -> false end
In this example, we are mapping over each value in the range, transforming them into false.
Doing iteration in Elixir is different than in imperative languages. You rarely want to call each for example, because as you noticed, the value of a doesn't change.
The
Introducing Erlang and the equivalent
Introducing Elixir book are great resources into pattern matching, recursion and other functionality found in functional programming languages.
José Valim
Skype: jv.ptec
Founder and Lead Developer