The Enum module
The Stream module
The Collectable protocol
Elixir comes with a number of types that act as collections. We’ve already seen lists and dictionaries. There are also things such as ranges, files, dictionaries, and even functions. 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 ...