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 2828/// `Collection` protocol.
2929///
3030/// 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`:
3333///
3434/// - If `i >= c.startIndex && i < c.endIndex`, then
3535/// `c.index(before: c.index(after: i)) == i`.
3636/// - If `i > c.startIndex && i <= c.endIndex`, then
3737/// `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`.
3842public protocol BidirectionalCollection : Collection
3943where SubSequence: BidirectionalCollection , Indices: BidirectionalCollection {
4044 // FIXME: Only needed for associated type inference.
You can’t perform that action at this time.
0 commit comments