예제 #1
0
        internal static DynamicDelegate ReduceTaskInternal(AwaitableDynamicDelegate acc, IList <AwaitableDynamicDelegate> list)
        {
            var xf = new TaskXWrap(PipePInternal);

            foreach (var item in list)
            {
                acc = xf.Step(acc, item);
            }

            return(new PromiseLikeDynamicDelegate(xf.Result(acc)));
        }
 internal PromiseLikeDynamicDelegate(AwaitableDynamicDelegate fn)
 {
     f      = fn;
     Length = 1;
 }
예제 #3
0
 public AwaitableDynamicDelegate Step(AwaitableDynamicDelegate acc, AwaitableDynamicDelegate x)
 {
     return(f(acc, x));
 }