 public func seq<T, U, StreamToken>(
   _ left: @autoclosure @escaping () -> HeterogeneousParser<StreamToken, T>,
   _ right: @autoclosure @escaping () -> HeterogeneousParser<StreamToken, U>
-) -> ([StreamToken]) -> ((T, U), [StreamToken])? {
+) -> HeterogeneousParser<StreamToken, (T, U)> {
   return { source in
     return left()(source).flatMap { leftResult in
       return right()(leftResult.1).map { rightResult in

}

postfix operator +
public postfix func +<T, StreamToken>(_ parser: @autoclosure @escaping () -> HeterogeneousParser<StreamToken, T>) -> ([StreamToken]) -> ([T], [StreamToken])? {
  return rep1(parser)
}

public func opt<T, StreamToken>(_ parser: @autoclosure @escaping () -> HeterogeneousParser<StreamToken, T>) -> ([StreamToken]) -> (T?, [StreamToken]) {
  return { source in
    parser()(source).map { (Optional.some($0.0), $0.1) } ?? (.none, source)
  }
}

postfix operator *? // because '?' is forbidden
public postfix func *?<T, StreamToken>(_ parser: @autoclosure @escaping () -> HeterogeneousParser<StreamToken, T>) -> ([StreamToken]) -> (T?, [StreamToken]) {
  return opt(parser)
}

public func not<T: Equatable>(_ value: T) -> HomogeneousParser<T> {
  return { source in

  }
}

public func |<T, StreamToken>(
  _ left: @autoclosure @escaping () -> HeterogeneousParser<StreamToken, T>,
  _ right: @autoclosure @escaping () -> HeterogeneousParser<StreamToken, T>
  ) -> HeterogeneousParser<StreamToken, T> {
  return or(left, right)
}

// Generate parser which matches 0 or more of `parser` argument
// Always succeeds.
