public static Either <A, X> Swap <X, A>(this Either <X, A> either) { return(either.Cata(Right <A, X>, Left <A, X>)); }
public static A RightOr <X, A>(this Either <X, A> either, Func <A> or) { return(either.Cata(x => or(), a => a)); }
public static bool IsRight <X, A>(this Either <X, A> either) { return(either.Cata(x => false, a => true)); }
public static X LeftOr <X, A>(this Either <X, A> either, Func <X> or) { return(either.Cata(x => x, a => or())); }
public Either <X, A> Op(Either <X, A> t1, Either <X, A> t2) { return(t1.Cata(x => t2, a => t1)); }