public static EitherAsync <L, R> Flatten <L, R>(this EitherAsync <L, EitherAsync <L, R> > ma) =>
 ma.Bind(identity);
 /// <summary>
 /// Commits current transaction in ABAP backend and waits for the commit to be completed.
 /// This method accepts a <see cref="EitherAsync{RfcErrorInfo,R1}"/> with any right value and returns it after commit.
 /// </summary>
 /// <typeparam name="R1">Type of function result</typeparam>
 /// <param name="self"></param>
 /// <param name="context"></param>
 /// <returns>A <see cref="EitherAsync{RfcErrorInfo,R1}"/> with the Right value of argument self or the left value.</returns>
 public static EitherAsync <RfcErrorInfo, R1> CommitAndWait <R1>(this EitherAsync <RfcErrorInfo, R1> self,
                                                                 IRfcContext context)
 {
     return(self.Bind(res => context.CommitAndWait().Map(u => res)));
 }
 public static EitherAsync <TFailure, Option <TResult> > MapO <TFailure, TSource, TResult>(
     this EitherAsync <TFailure, Option <TSource> > @this,
     Func <TSource, EitherAsync <TFailure, TResult> > f)
 => @this.Bind(opt => opt.Match(t => f(t).Map(Optional), () => Right <TFailure, Option <TResult> >(Option <TResult> .None).ToAsync()));