tuple2<A, B> function

Parser<Tuple2<A, B>> tuple2<A, B>(
  1. Parser<A> a,
  2. Parser<B> b
)

A typed parser that parses a sequence of 2 values of different types.

Implementation

Parser<Tuple2<A, B>> tuple2<A, B>(Parser<A> a, Parser<B> b) {
  return chain([a, b]).map((r) {
    return Tuple2(r.value[0] as A, r.value[1] as B);
  });
}