[PublicAPI] public static Either <A, Option <BB> > flatMapT <A, B, BB>( this Either <A, Option <B> > m, Fn <B, Option <BB> > mapper ) => m.mapRight(_ => _.flatMap(mapper));
public B fold <B>(Fn <A, B> onValue, Fn <Exception, B> onException) { return(isSuccess ? onValue(_value) : onException(_exception)); }
[PublicAPI] public static IRxVal <Option <B> > mapT <A, B>( this IRxVal <Option <A> > rxMaybeA, Fn <A, B> f ) => rxMaybeA.map(maybeA => maybeA.map(f));
[PublicAPI] public static Option <Either <A, BB> > flatMapT <A, B, BB>( this Option <Either <A, B> > m, Fn <B, Either <A, BB> > mapper ) => m.map(_ => _.flatMapRight(mapper));
public static LazyVal <Option <B> > lazyFlatMapT <A, B>( this LazyVal <Option <A> > m, Fn <A, Option <B> > mapper ) => m.lazyMap(_ => _.flatMap(mapper));
[PublicAPI] public static LazyVal <Future <B> > lazyMapT <A, B>( this LazyVal <Future <A> > m, Fn <A, B> mapper ) => m.lazyMap(_ => _.map(mapper));
[PublicAPI] public static Future <Either <A, BB> > flatMapT <B, BB, A>( this Future <Either <A, B> > m, Fn <B, Future <BB> > mapper ) => m.flatMap(_ => _.fold( err => Future.successful(Either <A, BB> .Left(err)), from => mapper(from).map(Either <A, BB> .Right) ));
[PublicAPI] public static Future <Try <To> > flatMapT <From, To>( this Future <Try <From> > m, Fn <From, Future <To> > mapper ) => m.flatMap(_ => _.fold( from => mapper(from).map(F.scs), err => Future.successful(F.err <To>(err)) ));
[PublicAPI] public static Future <Either <A, BB> > flatMapT <A, B, BB>( this Future <Either <A, B> > m, Fn <B, Future <Either <A, BB> > > mapper ) => m.flatMap(_ => _.fold( a => Future.successful(Either <A, BB> .Left(a)), mapper ));
[PublicAPI] public static Future <Either <A, BB> > mapT <A, B, BB>( this Future <Either <A, B> > m, Fn <B, BB> mapper ) => m.map(_ => _.mapRight(mapper));
[PublicAPI] public static Future <Option <B> > flatMapT <A, B>( this Future <Option <A> > m, Fn <A, Future <Option <B> > > mapper ) => m.flatMap(_ => _.fold( () => Future.successful(F.none <B>()), mapper ));
[PublicAPI] public static Future <Option <B> > flatMapT <A, B>( this Future <Option <A> > m, Fn <A, Option <B> > mapper ) => m.map(_ => _.flatMap(mapper));
public B fold <B>(Fn <A, B> onValue, Fn <Exception, B> onException) => isSuccess?onValue(_value) : onException(_exception);