     }
 
     // alternate implementation: zip(elts, elts.dropFirst())
-    var doublets: [(Generator.Element, Generator.Element)]? {
+    var doublets: [(Element, Element)]? {
         guard count >= 2 else { return nil }
 
-        var output: [(Generator.Element, Generator.Element)] = []
+        var output: [(Element, Element)] = []
         for i in 1..<count {
             output.append((self[i-1], self[i]))
         }

}

extension Array {
    func zip(almostSameLengthArray otherArray: [Generator.Element]) -> [Generator.Element] {
        let selfCount = count
        let otherCount = otherArray.count
        let selfIsBigger = selfCount > otherCount


extension Array where Element : Equatable {
    // Remove first collection element that is equal to the given `object`:
    mutating func remove(object: Element) {
        if let index = indexOf(object) {
            removeAtIndex(index)
        }
