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

MemberDescriptionAvailable through
containsReports whether a value belongs to this range.
isEmptyReports whether this range contains no values.
iteratorCreates a cursor starting at this range's included lower endpoint.