Chapter 3Tuples and Functions
In our journey so far, we’ve learned to build and manipulate Elixir projects and use primitive data types. The next few data types are for sequential data. Languages like Ruby have one dominant way to represent sequential data, the array. Elixir has multiple ways to represent sequential data. Tuples express fixed-length sequential data, and lists represent variable-length sequential data.
In this chapter, we’ll begin our exploration of tuples. Along the way, we’ll use tools and techniques to create, inspect, and use them. As you might imagine, central to those techniques will be functions and pattern matching. As usual, we’ll explore each data structure in the console and we’ll also begin to roll them up into advanced ...
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