   }
 
   @warn_unused_result
-  public func advance(i: Index, by n: Index.Distance) -> Index {
+  public func advance(i: Index, by n: IndexDistance) -> Index {
     if n >= 0 {
       return _advanceForward(i, by: n)
     }
     var i = i
-    for var offset: Index.Distance = n; offset != 0; offset = offset + 1 {
+    for var offset: IndexDistance = n; offset != 0; offset = offset + 1 {
       _previousInPlace(&i)
     }
     return i
   }
 
   @warn_unused_result
-  public func advance(i: Index, by n: Index.Distance, limit: Index) -> Index {
+  public func advance(i: Index, by n: IndexDistance, limit: Index) -> Index {
     if n >= 0 {
       return _advanceForward(i, by: n, limit: limit)
     }
     var i = i
-    for var offset: Index.Distance = n; offset != 0 && i != limit;
+    for var offset: IndexDistance = n; offset != 0 && i != limit;
         offset = offset + 1 {
       _previousInPlace(&i)
     }

  }

  @warn_unused_result
  public func advance(i: Index, by n: Index.Distance) -> Index {
    _precondition(n >= 0,
      "Can't advance an Index of MyForwardCollectionType by a negative amount")
    return i.advancedBy(n)
  }

  @warn_unused_result
  public func advance(i: Index, by n: Index.Distance, limit: Index) -> Index {
    _precondition(n >= 0,
      "Can't advance an Index of MyForwardCollectionType by a negative amount")
    let d = i.distanceTo(limit)


  var isEmpty: Bool { get }

  var count: IndexDistance { get }
}

extension MyForwardCollectionType {
  /// Do not use this method directly; call advancedBy(n) instead.
  @inline(__always)
  @warn_unused_result
  internal func _advanceForward(i: Index, by n: IndexDistance) -> Index {
    _precondition(n >= 0,
      "Only BidirectionalIndexType can be advanced by a negative amount")

    var i = i
    for var offset: IndexDistance = 0; offset != n; offset = offset + 1 {
      _nextInPlace(&i)
    }
    return i
