Numeric range of values.
[ Exp₁ .. Exp₃ ]
[ Exp₁, Exp₂ .. Exp₃ ]
Ranges are a shorthand for describing lists of integers from Exp₁ up to (exclusive) Exp₃ with increments of 1. When Exp₂ is present it is taken as the second element of the list and Exp₂ - Exp₁ is used as increment for the subsequent list elements.
A range with integer expressions is identical to a list Slice. However, a range may also contain numeric expressions that are not integers.
rascal>[1 .. 10];
rascal>[1, 3 .. 10];
rascal>[0.5, 3.2 .. 10];
rascal>[1, -2 .. -10];
Ranges are mostly used to loop over ranges of integers.
In some cases ranges are empty where one could have expected at least one element:
rascal>[1, 3 .. -10];