May 2018
Intermediate to advanced
412 pages
9h 3m
English
We cover:
Elixir comes with a number of types that act as collections. We’ve already seen lists and maps. Ranges, files, and even functions can also act as collections. And as we’ll discuss when we look at protocols, you can also define your own.
Collections differ in their implementation. But they all share something: you can iterate through them. Some of them share an additional trait: you can add things to them.
Technically, things that can be iterated are said to implement the Enumerable protocol.
Elixir provides two modules that have a bunch of iteration functions. The Enum module is the workhorse for collections. You’ll ...
Read now
Unlock full access