public static Pair <Either <X, A>, Either <X, B> > Unzip <X, A, B>(this Either <X, Pair <A, B> > p) { return(p.Select(q => q._1.Get).And(p.Select(q => q._2.Get))); }
public Either <A, D> ZipWith <C, D>(Either <A, C> o, Func <B, Func <C, D> > f) { return(this.SelectMany(a => o.Select(b => f(a)(b)))); }
public static Either <X, B> Apply <X, A, B>(this Either <X, Func <A, B> > f, Either <X, A> o) { return(f.SelectMany(g => o.Select(p => g(p)))); }