示例#1
0
 public static bool equals <EQ, A>(Que <A> x, Que <A> y) where EQ : struct, Eq <A> =>
 EqQue <EQ, A> .Inst.Equals(x, y);
示例#2
0
 public static Aff <RT, Que <A> > SequenceParallel <RT, A>(this Que <Aff <RT, A> > ta, int windowSize)
     where RT : struct, HasCancel <RT> =>
 TraverseParallel(ta, identity, windowSize);
示例#3
0
 public static Aff <RT, Que <A> > SequenceSerial <RT, A>(this Que <Aff <RT, A> > ta)
     where RT : struct, HasCancel <RT> =>
 TraverseSerial(ta, identity);
示例#4
0
 public static IEnumerable <Que <B> > Traverse <A, B>(this Que <IEnumerable <A> > ma, Func <A, B> f) =>
 CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToArray(), f)
 .Map(toQueue);
示例#5
0
 public static Aff <RT, Que <A> > SequenceParallel <RT, A>(this Que <Aff <RT, A> > ta)
     where RT : struct, HasCancel <RT> =>
 TraverseParallel(ta, identity, SysInfo.DefaultAsyncSequenceParallelism);
示例#6
0
 public static Que <T> enq <T>(Que <T> queue, T value) =>
 queue.Enqueue(value);
示例#7
0
        public static async Task <Que <B> > Traverse <A, B>(this Que <Task <A> > ma, Func <A, B> f)
        {
            var rb = await Task.WhenAll(ma.Map(async a => f(await a))).ConfigureAwait(false);

            return(new Que <B>(rb));
        }
示例#8
0
 public static int hash <A>(Que <A> xs) =>
 xs.GetHashCode();
示例#9
0
 public static HashSet <Que <B> > Traverse <A, B>(this Que <HashSet <A> > ma, Func <A, B> f) =>
 toHashSet(CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToArray(), f)
           .Map(toQueue));
示例#10
0
 public static Aff <RT, Que <B> > TraverseParallel <RT, A, B>(this Que <Aff <RT, A> > ma, Func <A, B> f)
     where RT : struct, HasCancel <RT> =>
 TraverseParallel <RT, A, B>(ma, f, SysInfo.DefaultAsyncSequenceParallelism);