public static IEither <TException, T2> SelectMany <TException, T0, T1, T2>(
     this IEither <TException, T0> either,
     Func <T0, IEither <TException, T1> > selector,
     Func <T0, T1, T2> projector)
 {
     return(either.SelectMany(value0 => selector(value0).Select(value1 => projector(value0, value1))));
 }
Beispiel #2
0
 public static IEither <L, R1> SelectMany <L, R, R1, U>(
     this IEither <L, R> source,
     Func <R, IEither <L, U> > k,
     Func <R, U, R1> s)
 {
     return(source
            .SelectMany(x => k(x)
                        .SelectMany(y => new Right <L, R1>(s(x, y)))));
 }