This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Elixir has lazily evaluated enumerable objects that allow you | |
| # to work with enumerable objects like lists either only as needed | |
| # or infinitely. | |
| # Start up iex to play around | |
| $ iex | |
| # Typical enumeration is done eagerly where the result is computed ASAP | |
| iex> Enum.map(1..10, fn i -> i * 2 end) | |
| [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] |