This example shows the literal syntax used to create a range.

# range is inclusive start to end
1..4

[1, 2, 3, 4] = Enum.to_list( 1..4 )

# can be defined high to low
4..1

Documentation: Range