 
 public extension RangeReplaceableCollectionType {
     
-    mutating func replace<C : CollectionType where Self.Generator.Element == C.Generator.Element>(with newElements: C) {
+    mutating func replace<C : CollectionType where Generator.Element == C.Generator.Element>(with newElements: C) {
         self.replaceRange(self.indices, with: newElements)
     }
 }

public extension LazyCollectionType {
    
    @warn_unused_result
    func collect<I : SequenceType where Elements.Index == I.Generator.Element>(indices: I) -> PermutationGenerator<Self.Elements, I> {
        return PermutationGenerator(elements: self.elements, indices: indices)
    }
    
    @warn_unused_result
    func collect<I : CollectionType where Elements.Index == I.Generator.Element>(indices: I) -> PermutationCollection<Self.Elements, I> {
        return PermutationCollection(_base: self.elements, _indices: indices)
    }
}

    ///
    /// - Complexity: O(1)
    @warn_unused_result
    func scan<R>(initial: R, combine: (R, Elements.Generator.Element) -> R) -> LazyScanSequence<Elements, R> {
        return LazyScanSequence(initial: initial, base: self.elements, combine: combine)
    }
}
