concept range in category elixir

This is an excerpt from Manning's book Elixir in Action.
A range is an abstraction that allows you to represent a range of numbers. Elixir even provides a special syntax for defining ranges:
iex(1)> range = 1..2You can ask whether a number falls in the range by using the
inoperator:iex(2)> 2 in range true iex(3)> -1 in range falseRanges are enumerable, so functions from the
Enummodule know how to work with them. Earlier you metEnum.each/2, which iterates through an enumerable. The following example uses this function with a range to print the first three natural numbers:iex(4)> Enum.each( 1..3, &IO.puts/1 ) 1 2 3It’s important to realize that a range isn’t a special type. Internally, it’s represented as a map that contains range boundaries. You shouldn’t rely on this knowledge, because the range representation is an implementation detail, but it’s good to be aware that the memory footprint of a range is very small, regardless of the size. A million-number range is still just a small map.