 }
 
 extension CollectionType
-  where Self : _ReverseCollectionType, Self.Base.Index : BidirectionalIndexType {
-  public var startIndex : _prext_ReverseIndex<Self.Base.Index> {
-    return _prext_ReverseIndex(_base.endIndex)
-  }
-}
-
-extension CollectionType
   where Self : _ReverseCollectionType, Self.Index.Base == Self.Base.Index
 {
+  public var startIndex : Index { return Self.Index(_base.endIndex) }
   public var endIndex : Index { return Self.Index(_base.startIndex) }
   public subscript(position: Index) -> Self.Base.Generator.Element {
     return _base[position._base.predecessor()]

  public var elements: Self { return self }
}

extension _prext_LazySequenceType where Self : _SequenceWrapperType {
  public var elements: Base { return _base }
}

/// A sequence that forwards its implementation to an underlying
/// sequence instance while exposing lazy computations as methods.
public struct _prext_LazySequence<Base_ : SequenceType> : _SequenceWrapperType {
  public var _base: Base_
}

/// Augment `s` with lazy methods such as `map`, `filter`, etc.
public func _prext_lazy<S : SequenceType>(s: S) -> _prext_LazySequence<S> {
  return _prext_LazySequence(_base: s)
}

//===--- LazyCollection.swift ---------------------------------*- swift -*-===//
//

  public let _base: Base_
}

public struct _prext_ReverseRandomAccessCollection<
  Base_ : CollectionType where Base_.Index : RandomAccessIndexType
> : _ReverseCollectionType {
  
  public typealias Index = _prext_ReverseRandomAccessIndex<Base_.Index>
  public typealias Generator = IndexingGenerator<
    _prext_ReverseRandomAccessCollection
  >
  
  public init(_ base: Base_) {
    self._base = base
  }

  public let _base: Base_
}

tests.test("ReverseCollection") {

  let expected = Array(stride(from: 11, through: 0, by: -1))
  let r = 0..<12
  checkRandomAccessCollection(
    expected,
    _prext_ReverseRandomAccessCollection(r))
  
  checkBidirectionalCollection(
    "raboof".characters,
    _prext_ReverseCollection("foobar".characters))
}


/*****
/// The lazy `CollectionType` returned by `reverse(c)` where `c` is a
