public static Pair <TreeForest <A>, TreeForest <B> > Unzip <A, B>(this TreeForest <Pair <A, B> > p) { return(Pair <TreeForest <A>, TreeForest <B> > .pair(p.Select(a => a._1.Get), p.Select(a => a._2.Get))); }
public List <Pair <A, B> > Zip <B>(List <B> bs) => ZipWith <B, Pair <A, B> >(bs, a => b => Pair <A, B> .pair(a, b));
public static PairAndMonoid <X, B> SelectMany <X, A, B>(this PairAndMonoid <X, A> ps, Func <A, PairAndMonoid <X, B> > f) { var r = f(ps.b); return(new PairAndMonoid <X, B>(Pair <X, B> .pair(ps.M.Op(ps.a, r.a), r.b), ps.M)); }
public static Pair <A, B> And <A, B>(this A a, B b) { return(Pair <A, B> .pair(a, b)); }
public static Iteratee <E, A> Done(A a, Input <E> i) { return(new Iteratee <E, A>(Pair <A, Input <E> > .pair(a, i).Left <Pair <A, Input <E> >, Func <Input <E>, Iteratee <E, A> > >())); }
public static Pair <A, B> And <A, B>(this A a, B b) => Pair <A, B> .pair(a, b);