 
     public func makeIterator() -> String.CharacterView.Iterator {
         return stream.makeIterator()
+    }
+
+    public func drop(while predicate: (Character) throws -> Bool) rethrows -> ParserInput {
+        var newLoc = location
+        var rest = stream
+        for char in stream {
+            guard try predicate(char) else { break }
+            rest.removeFirst()
+            if char == "\n" {
+                newLoc.line += 1
+                newLoc.column = 0
+            } else {
+                newLoc.column += 1
+            }
+        }
+        return ParserInput(rest, at: newLoc)
     }
 
     public func dropFirst() -> ParserInput {

        }
    }

    public func apply<MapTarget>(_ transform: Parser<@escaping (Output) -> MapTarget>) -> Parser<MapTarget> {
        return Parser<MapTarget> { input in
            let (out1, rest1) = try transform.run(input)
            let (out2, rest2) = try self.run(rest1)


extension ParserInput : Sequence {

    public func prefix(_ maxLength: Int) -> ParserInput {
        return ParserInput(stream.prefix(maxLength), at: location)
    }

    public func prefix(while predicate: (Character) throws -> Bool) rethrows -> ParserInput {
        return try ParserInput(stream.prefix(while: predicate), at: location)
    }

    public func suffix(_ maxLength: Int) -> ParserInput {
        return ParserInput(stream.suffix(maxLength), at: location)
    }
