fleshing out Collection.next(Index)

-removed fatal stub Collection.next(Index)
-added default Collection.next(Index) where Index is Strideable
-added custom next(Index) on some collections
-added fatal stub next(Index) on some collections
This commit is contained in:
Shawn Erickson
2016-03-06 17:37:40 -08:00
parent fc636b94f5
commit 0db3a29987
12 changed files with 109 additions and 55 deletions

View File

@@ -116,6 +116,12 @@ extension String {
return Index(_core.endIndex, _core)
}
// TODO: swift-3-indexing-model - add docs
@warn_unused_result
public func next(i: Index) -> Index {
fatalError("FIXME: swift-3-indexing-model implement")
}
/// Access the element at `position`.
///
/// - Precondition: `position` is a valid position in `self` and