 public struct _prext_LazyCollection<Base_ : CollectionType>
   : /*_prext_LazyCollectionType,*/ _CollectionWrapperType {
 
-  typealias Base = Base_
-  typealias Index = Base.Index
+  public typealias Base = Base_
+  public typealias Index = Base.Index
   
   /// Construct an instance with `base` as its underlying Collection
   /// instance.

// REQUIRES: executable_test

import StdlibUnittest

//===--- SequenceWrapper.swift - sequence/collection wrapper protocols ----===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
//  To create a SequenceType or CollectionType that forwards
//  requirements to an underlying SequenceType or CollectionType,
//  have it conform to one of these protocols.
//
//===----------------------------------------------------------------------===//

/// A type that is just a wrapper over some base Sequence
internal protocol _SequenceWrapperType {
  typealias Base : SequenceType
  typealias Generator : GeneratorType = Base.Generator
  
  var _base: Base {get}
}

extension SequenceType
  where Self : _SequenceWrapperType, Self.Generator == Self.Base.Generator {
  /// Return a *generator* over the elements of this *sequence*.
  ///
  /// - Complexity: O(1).
  public func generate() -> Base.Generator {
    return self._base.generate()
  }

  public func underestimateCount() -> Int {
    return _base.underestimateCount()
  }

  public func _customContainsEquatableElement(
    element: Base.Generator.Element
  ) -> Bool? { 
    return _base._customContainsEquatableElement(element)
  }
  
  /// Copy a Sequence into an array.
  public func _initializeTo(ptr: UnsafeMutablePointer<Base.Generator.Element>) {
    return _base._initializeTo(ptr)
  }
}

internal protocol _CollectionWrapperType : _SequenceWrapperType {
  typealias Base : CollectionType
  typealias Index : ForwardIndexType = Base.Index
  var _base: Base {get}
}

extension CollectionType
  where Self : _CollectionWrapperType, Self.Index == Self.Base.Index {


//===--- LazyCollection.swift ---------------------------------*- swift -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

