[PublicAPI] public static Either <Left, ImmutableList <To> > mapRightC <From, To, Left>( this Either <Left, ImmutableList <From> > e, Fn <From, To> mapper ) => mapRightC(e, mapper, _ => _.ToImmutableList());
public EitherEnumerator(Either <A, B> either) : this() { this.either = either; }
[PublicAPI] public static Either <ImmutableList <To>, Right> mapLeftC <From, To, Right>( this Either <ImmutableList <From>, Right> e, Fn <From, To> mapper ) => mapLeftC(e, mapper, _ => _.ToImmutableList());
[PublicAPI] public static Either <IEnumerable <ElemTo>, Right> mapLeftC <CollFrom, Right, ElemFrom, ElemTo>( this Either <CollFrom, Right> e, Fn <ElemFrom, ElemTo> mapper ) where CollFrom : IEnumerable <ElemFrom> => e.mapLeft(mapC <CollFrom, ElemFrom, ElemTo>(mapper));
[PublicAPI] public static Either <Left, IEnumerable <ElemTo> > mapRightC <CollFrom, Left, ElemFrom, ElemTo>( this Either <Left, CollFrom> e, Fn <ElemFrom, ElemTo> mapper ) where CollFrom : IEnumerable <ElemFrom> => e.mapRight(mapC <CollFrom, ElemFrom, ElemTo>(mapper));
public Either <A, B> toLeft <B>(Fn <B> right) { return(isSome ? Either <A, B> .Left(value) : Either <A, B> .Right(right())); }
[PublicAPI] public static Either <A, B> flatten <A, B>(this Either <A, Either <A, B> > e) => e.flatMapRight(_ => _);
[PublicAPI] public Either <B, A> toRight <B>(B left) => isSome ? Either <B, A> .Right(__unsafeGetValue) : Either <B, A> .Left(left);
public Either <A, B> toLeft <B>(Fn <B> right) => isSome ? Either <A, B> .Left(__unsafeGetValue) : Either <A, B> .Right(right());
public static Either <L, R2> SelectMany <L, R, R1, R2>( this Either <L, R> opt, Fn <R, Either <L, R1> > f, Fn <R, R1, R2> g ) => opt.flatMapRight(f, g);
[PublicAPI] public Either <A, B> toLeft <B>(B right) => isSome ? Either <A, B> .Left(__unsafeGetValue) : Either <A, B> .Right(right);
public static Either <L, R1> SelectMany <L, R, R1>(this Either <L, R> e, Fn <R, Either <L, R1> > f) => e.flatMapRight(f);
public static Either <L, R1> Select <L, R, R1>(this Either <L, R> e, Fn <R, R1> f) => e.mapRight(f);
public Either <B, A> toRight <B>(Fn <B> left) { return(isSome ? Either <B, A> .Right(value) : Either <B, A> .Left(left())); }
[PublicAPI] public static Either <A, B> opt <A, B>(bool condition, A ifFalse, B ifTrue) => condition ? Either <A, B> .Right(ifTrue) : Either <A, B> .Left(ifFalse);
public Either <B, A> toRight <B>(Fn <B> left) => isSome ? Either <B, A> .Right(__unsafeGetValue) : Either <B, A> .Left(left());
[PublicAPI] public static Either <A, B> opt <A, B>(bool condition, Fn <A> ifFalse, Fn <B> ifTrue) => condition ? Either <A, B> .Right(ifTrue()) : Either <A, B> .Left(ifFalse());
public static Either <ImmutableList <A>, B> asValidation <A, B>( this Either <A, B> e1 ) { return(e1.mapLeft(ImmutableList.Create)); }