Chapter 3Immutability

Change and decay in all around I see…

Henry Francis Lyte“Abide with Me”

If you listen to functional-programming aficionados, you’ll hear people making a big deal about immutability—the fact that in a functional program, data cannot be altered once created.

And, indeed, Elixir enforces immutable data.

But why?

Get Programming Elixir now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.