April 2024
Beginner to intermediate
224 pages
5h 7m
English
Functions are simple at first glance—they have a name, arguments, and a body. But Elixir allows you to overload functions in several different ways that aren’t possible in most other languages. Even though they are simple, this ability to overload them makes functions very powerful.
You wrote named functions in the previous section. In this section, you’ll deal with anonymous functions. Anonymous functions are a quick and convenient way to define functions inline in your code.
Let’s get started with anonymous functions.
Anonymous functions are ones that have no name. They are commonly used when passing behavior into a different function, such as an enumeration function.
Anonymous functions are quick and ...
Read now
Unlock full access