示例#1
0
文件: Future.cs 项目: beeh1ve/common
 public static Future <TR> SelectMany <T, TTR, TR>(this Future <T> a, Func <T, Future <TTR> > fn, Func <T, TTR, TR> cp)
 => a.SelectMany(x => fn(x).SelectMany(y => Future.Delay(() => cp(x, y))));
示例#2
0
文件: Future.cs 项目: beeh1ve/common
 public static Future <TOut> Map <TVal, TOut>(this Future <TVal> ctx, Func <TVal, TOut> expr)
 => ctx.FlatMap(_ => Future.Delay(() => expr(_)));