         guard let (result1, remainder1) = left(stream) else { return nil }
         guard let (result2, remainder2) = right(remainder1) else { return nil }
         return ((result1, result2), remainder2)
+    }
+}
+
+private func eatLeft<A, B>(_ left: @escaping Parser<A>, _ right: @escaping Parser<B>) -> Parser<B> {
+    return { stream in
+        guard let (_, remainder1) = left(stream) else { return nil }
+        guard let (result2, remainder2) = right(remainder1) else { return nil }
+        return (result2, remainder2)
     }
 }
 

            guard let (b, remainder4) = hexDigit(remainder3) else { return nil }
            guard let (c, remainder5) = hexDigit(remainder4) else { return nil }
            guard let (d, remainder6) = hexDigit(remainder5) else { return nil }
            print(a, b, c, d)
            return (String([a, b, c, d]), remainder6)
        }
    }()

    return { stream in
        guard let (result, remainder) = parser(stream) else { return nil }
        return (transform(result), remainder)
    }
}

private func optional<A>(_ parser: @escaping Parser<A>) -> Parser<A?> {
    return { stream in
        if let (result, remainder) = parser(stream) {
            return (result, remainder)
        } else {
            return (nil, stream)
        }
    }
}

