Wrapping Up
In this chapter, we started with the basics of functional programming, from simple expressions to building named functions with modules. Let’s review what we’ve done:
-
We created simple expressions with Elixir values, literals, and operators.
-
We created anonymous functions and used them as a new value type.
-
We tested the variables’ immutability and scope.
-
We created named functions and learned how to import functions to our modules.
-
We used named functions as values.
In the next chapter, we’ll explore one of the most interesting features of functional programming: pattern matching. Learning how to use it will take your programming skills to a whole new level.
Your Turn
-
Create an expression that solves the following problem: Sarah has ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access