Today I Learned

Elixir Range is a struct

Creating a range in Elixir returns a struct that holds the first and last numbers in the range.

iex(5)> %Range{first: first, last: last} = 1..4
1..4
iex(6)> first
1
iex(7)> last
4