Start with the Right Data
First, we examined how choices of data structure might change access patterns and impact the complexity of the code we write. We introduced simple principles to keep data structures flat and saw that functional data structures are generally slower.
Next we introduced the way functional programmers shape data, preferring many versions of a value over time rather than continuously mutating a single value.
We looked at Elixir’s data structures, including lists, tuples, maps, and structs, among others. We showed some of the strengths and weaknesses of each.
Finally, we applied all of those lessons using a functional component. We defined templates with functions to generate questions, and we defined function fields to check ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access