Wrapping Up

That was a challenging chapter! We’ve used everything we covered in the previous chapters to build a larger application, and we faced some new concepts. Let’s review:

  • We covered how to start a project with Mix and its basic commands.
  • We saw how to structure the project in folders and namespaces.
  • We created customized structs to describe our domain.
  • We used Elixir protocols to achieve polymorphism.
  • We used Elixir behaviours to create a contract between modules.

In the next chapter, the final chapter, we’ll explore a topic that we ignored in this chapter: what to do when things don’t work as expected. You’ll learn how to handle errors and unexpected events.

Your Turn

This time you won’t have exercises with a right or wrong answer. Instead ...

Get Learn Functional Programming with Elixir now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.