Wrapping Up
A clean data layer makes it easier to work with, maintain, and extend a software application. Elixir provides a whole host of data types, but lists and maps are among the most important as you model an application’s data.
Lists hold any data in your application. They are easy to work with, but their performance characteristics mean that you need to be a bit cautious about how you use them. Keyword lists are a special type of list that are most commonly used to pass around options in your application.
Maps are the heart of an application’s data layer. They are simply containers that hold key-value pairs, but their performance and ease of use make them the most common data type. Structs are a special type of map with additional features ...
Get From Ruby to 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.