ranges are used to store the bounds of a range of values, and can be taken from group literals. Ranges can be inclusive or exclusive.
ranges can be combined into a composite range
range_exclusive_exclusive
range_inclusive_inclusive
range_exclusive_inclusive
range_inclusive_exclusive
composite_range
(1) ([element1],[element2])r
(2) [[element1],[element2]]r
(3) ([element1],[element2]]
([element1],[element2]]r
(4) [[element1],[element2])
[[element1],[element2])r
(5) [first int]...[last int]
[element1] must be less than or equal to [element2]
(1) A range with two exclusive endpoints (range_exclusive_exclusive)
(2) A range with two inclusive endpoints (range_inclusive_inclusive)
(3) A range with endpoint [element1] exclusive and [element2] inclusive (range_exclusive_inclusive)
(4) A range with endpoint [element1] inclusive and [element2] exclusive (range_inclusive_exclusive)
(5) Shorthand for an inclusive range starting with [first int] and ending with [last int] and has step 1
collection
[range]#
returns the range of [range] ([element2]-[element1])
[range]+[range]
returns the concatenation of the two ranges
[range]+[element]
returns the range translated up by [element]
[range1]-[range2]
returns [range1] with [range2] removed
[range]-[element]
returns the range translated down by [element]
[range] and [range]
returns the intersection of the two ranges
[range] xor [range]
returns the range in one and only one of the specified ranges
[range] or [range]
returns the union of the two ranges
[range]*[number]
returns [range1] with all endpoints dilated by a factor of [number]
[range]/[number]
returns [range1] with all endpoints dilated by a factor of 1/[number]
[range]=[range]
returns whether both ranges cover the same regions
[range]!=[range]
returns whether there are points in one range but not the other
[range][[element]]
returns whether [element] is contained in the range
[element] in [range]
returns whether [element] is contained in the range
keeps:
[variable]=[value]
[variable]==[value]
[value]<<[value]