A tail is the remainder of a list after its first element, exposed by decomposing a list into a head and tail. Because lists are singly linked, this structure supports traversal rather than direct positional access. section 2.4.4
Extracting the tail
For [1, 2, 3, 4], hd/1 returns 1 and tl/1 returns [2, 3, 4]. The same structure can be written as [head | tail]. section 2.4.4
iex(1)> prime_numbers = [2, 3, 5, 7] [2, 3, 5, 7]
Use the linked examples to inspect list construction and tail extraction interactively. section 2.4.4


