You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the base [Range](https://docs.groovy-lang.org/latest/html/api/groovy/lang/Range.html) interface doesn't indicate inclusiveness and
80
80
has somewhat contradictory contract of `containsWithinBounds` function.
81
81
82
-
- Swift distinguishes open-ended [`Range`](https://developer.apple.com/documentation/swift/range) and closed [`ClosedRange`](https://developer.apple.com/documentation/swift/closedrange)
83
-
structures.
82
+
- Swift has the base protocol [`RangeExpression`](https://developer.apple.com/documentation/swift/rangeexpression/) which is implemented
83
+
by the open-ended [`Range`](https://developer.apple.com/documentation/swift/range),
84
+
the closed [`ClosedRange`](https://developer.apple.com/documentation/swift/closedrange),
85
+
and also the one-sided `PartialRangeFrom` (start-inclusive), `PartialRangeThrough` (end-inclusive), `PartialRangeUpTo` (end-exclusive) ranges.
86
+
The base protocol provides operations of checking whether the range contains a value and slicing a collection
87
+
(i.e. producing the closed range of indices of the collection with the matching index type that are contained in the range).
0 commit comments