SplitScript reference / T..=T
T..=T
type constructor
T where Integer..=T where Integer
Represents an integer interval whose upper bound is included.
Use ..= when the value at end must be visited. Range bounds are immutable, and a range whose end precedes its start is empty.
Examples
Visit both endpoints
for checkpoint in 1..=3 {
print(checkpoint)
}
Methods
| Member | Description | Available through |
|---|---|---|
| contains | Reports whether a value belongs to this range. | |
| isEmpty | Reports whether this range contains no values. | |
| iterator | Creates a cursor starting at this range's included lower endpoint. |