This article discusses ranges in Ela.
Ranges in Ela are arithmetic sequences that can be used to generate lists. You only have to specify a first
element, a last element, and (optionally) a second element that will be used to calculate stepping.
Ranges are created using special literal syntax:
"[" first[,step]..[last] "]"
Here is an example of a simple range:
You can specify an optional step in a range:
If the first element of a range is lesser than the last element of a range, a step is mandatory:
It is possible to construct non-strict ranges (such as infinite lists). In this case the last element in range should be omitted: