File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 28
28
/// `Collection` protocol.
29
29
///
30
30
/// Indices that are moved forward and backward in a bidirectional collection
31
- /// move by the same amount in each direction. That is, for any index `i` into
32
- /// a bidirectional collection `c`:
31
+ /// move by the same amount in each direction. That is, for any valid index `i`
32
+ /// into a bidirectional collection `c`:
33
33
///
34
34
/// - If `i >= c.startIndex && i < c.endIndex`, then
35
35
/// `c.index(before: c.index(after: i)) == i`.
36
36
/// - If `i > c.startIndex && i <= c.endIndex`, then
37
37
/// `c.index(after: c.index(before: i)) == i`.
38
+ ///
39
+ /// Valid indices are exactly those indices that are reachable from the
40
+ /// collection's `startIndex` by repeated applications of `index(after:)`, up
41
+ /// to, and including, the `endIndex`.
38
42
public protocol BidirectionalCollection : Collection
39
43
where SubSequence: BidirectionalCollection , Indices: BidirectionalCollection {
40
44
// FIXME: Only needed for associated type inference.
You can’t perform that action at this time.
0 commit comments