Пример #1
0
 public static IoEitherMaybe <TLeft, TRight> Where <TLeft, TRight>(this IoEitherMaybe <TLeft, TRight> eitherT, Func <TRight, bool> predicate)
 {
     return(eitherT.Keep(predicate));
 }
Пример #2
0
 public static IoEitherMaybe <TLeft, TResult> SelectMany <TLeft, TRight, TResult>(this IoEitherMaybe <TLeft, TRight> eitherT, Func <TRight, IoEitherMaybe <TLeft, TResult> > f)
 {
     return(eitherT.Bind(f));
 }
Пример #3
0
 public static IoEitherMaybe <TLeft, TSelect> SelectMany <TLeft, TRight, TResult, TSelect>(this IoEitherMaybe <TLeft, TRight> eitherT, Func <TRight, IoEitherMaybe <TLeft, TResult> > f, Func <TRight, TResult, TSelect> selector)
 {
     return(eitherT.SelectMany(a => f(a).SelectMany(b => selector(a, b).AsIoRightMaybe <TLeft, TSelect>())));
 }
Пример #4
0
 public static IoEitherMaybe <TLeft, TResult> Select <TLeft, TRight, TResult>(this IoEitherMaybe <TLeft, TRight> eitherT, Func <TRight, TResult> f)
 {
     return(eitherT.FMap(f));
 }