summaryrefslogtreecommitdiff
path: root/src/code/1/tuples
blob: 60c5d527af7304f2b4a4c82b6ed64acadf5092ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
iex> {}
{}
iex> {1, 2, 3}
{1, 2, 3}
iex> {1, :a, 3}
{1, :a, 3}

iex> tuple_size {1, 2, 3}
3
iex> elem({1, 2, 3}, 1)
2
iex> tuple = {:ok, 'hello'}
{:ok, 'hello'}
iex> put_elem(tuple, 1, 'world'}
{:ok, 'world'}
iex> tuple
{:ok, 'hello'}