Elixir Data
Elixir data is immutable, so every transformation returns a new value. That shape makes reasoning about state changes much easier.
Atoms
:ok
:error
Collections
Lists, tuples, maps, and binaries are the primary data structures you will use every day.
Structs
Structs give you a named shape for application data without losing the flexibility of maps underneath.
Practice
- Create one atom, one map, and one struct example.
- Explain why immutable values reduce accidental side effects.
- Write one note about when a tuple is better than a map.