tuple3<A, B, C> function

Parser<Tuple3<A, B, C>> tuple3<A, B, C>(
  1. Parser<A> a,
  2. Parser<B> b,
  3. Parser<C> c
)

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

Implementation

Parser<Tuple3<A, B, C>> tuple3<A, B, C>(Parser<A> a, Parser<B> b, Parser<C> c) {
  return chain([a, b, c]).map((r) {
    return Tuple3(r.value[0] as A, r.value[1] as B, r.value[2] as C);
  });
}