Esempio n. 1
0
 public static Future <B> Ap <A, B>(this Func <A, B> f, Future <A> arg)
 {
     return(arg.Map(f));
 }
Esempio n. 2
0
 public static Future <B> Select <A, B>(this Future <A> m, Func <A, B> f)
 {
     return(m.Map(f));
 }
Esempio n. 3
0
 public static Maybe <Future <A> > SequenceMaybe <A>(this Future <Maybe <A> > future)
 {
     return(future.Map(m => m.Map(Future.Now)).Run());
 }
Esempio n. 4
0
 public static Maybe <Future <B> > TraverseMabye <A, B>(this Future <A> future, Func <A, Maybe <B> > f)
 {
     return(future.Map(f).SequenceMaybe());
 }
Esempio n. 5
0
 public static IEnumerable <Future <T> > SequenceEnumerable <T>(this Future <IEnumerable <T> > future)
 {
     return(future.Map(ts => ts.Select(Future.Now)).Run());
 }
Esempio n. 6
0
 public static IEnumerable <Future <B> > TraverseEnumerable <A, B>(this Future <A> future, Func <A, IEnumerable <B> > f)
 {
     return(future.Map(f).SequenceEnumerable());
 }