         }
     }
     
+    public var startIndex: Int {
+        0
+    }
+    
+    public var endIndex: Int {
+        length
+    }
+    
+    public func index(after i: Int) -> Int {
+        i + 1
+    }
+    
     public var weight: Int {
         self.sum{ Int($0.rawValue) }
     }

    }
}

public struct BitSequence: Sequence, Hashable, Comparable, ExpressibleByArrayLiteral, CustomStringConvertible, Codable {
    public typealias Element = Bit
    public typealias ArrayLiteralElement = Bit
    

    
    public func concat(with b: Self) -> Self {
        .init(intValue: intValue << b.length | b.intValue, length: length + b.length)
    }
    
    public static func < (lhs: Self, rhs: Self) -> Bool {
