Exemplo n.º 1
0
 public static IoEitherMaybe <TLeft, TRight> Where <TLeft, TRight>(this IoEitherMaybe <TLeft, TRight> eitherT, Func <TRight, bool> predicate)
 {
     return(eitherT.Keep(predicate));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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>())));
 }
Exemplo n.º 4
0
 public static IoEitherMaybe <TLeft, TResult> Select <TLeft, TRight, TResult>(this IoEitherMaybe <TLeft, TRight> eitherT, Func <TRight, TResult> f)
 {
     return(eitherT.FMap(f));
 }