Ejemplo n.º 1
0
 public static Faultable <TResult> Bind <T, TResult>(this Faultable <T> value, Func <T, TResult> transform)
 {
     return(value.Bind(arg => Return(transform, arg)));
 }
Ejemplo n.º 2
0
 public static Faultable <TResult> SelectMany <T, TIntermediate, TResult>(this Faultable <T> value, Func <T, Faultable <TIntermediate> > transform, Func <T, TIntermediate, TResult> project)
 {
     return(value.Bind(x => transform(x).Bind(y => Return(project(x, y)))));
 }
Ejemplo n.º 3
0
 public static Faultable <TResult> Bind <T, TResult>(this Faultable <T> value, Func <T, Faultable <TResult> > transform)
 {
     return(value.IsFaulted ? value.Error : transform(value.Value));
 }