Intro

Tuples are similar to lists except they store all their elements in a contiguous memory block. Tuples are defined with the curly braces {} .

elixir
# Define a tuple

tuple = {1, 2, 3}

Considerations

  • Updating or adding to tuples is expensive, because a new tuple is created in memory.
# elixir