O'Reilly logo

The Little Elixir & OTP Guidebook by Benjamin Tan Wei Hao

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. A whirlwind tour

This chapter covers

  • Your first Elixir program
  • Using Interactive Elixir (iex)
  • Data types
  • Pattern matching
  • List and recursion
  • Modules and functions
  • The pipe (|>) operator
  • Erlang interoperability

Instead of discussing each Elixir language feature in depth, I’m going to present them as a series of examples. I’ll elaborate more when we come to concepts that may seem unfamiliar to, say, a Java or Ruby programmer. For certain concepts, you can probably draw parallels from whatever languages you already know. The examples will be progressively more fun and will highlight almost everything you need to understand the Elixir code in this book.

2.1. Setting up your environment

Elixir is supported by most of the major ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required