Exemple #1
0
 public static Seq <A> New(Lst <A> seq, int index = 0, int count = -1) =>
 seq.Count == 0
         ? Empty
         : new SeqLst <A>(seq, index, count);
Exemple #2
0
        public static async Task <Lst <B> > Traverse <A, B>(this Lst <Task <A> > ma, Func <A, B> f)
        {
            var rb = await Task.WhenAll(ma.Map(async a => f(await a))).ConfigureAwait(false);

            return(new Lst <B>(rb));
        }
Exemple #3
0
 public static OptionUnsafe <Lst <B> > Sequence <A, B>(this Lst <A> ta, Func <A, OptionUnsafe <B> > f) =>
 ta.Map(f).Sequence();
Exemple #4
0
 /// <summary>
 /// Ctor
 /// </summary>
 VectorClock(Lst <ClockEntry> versions)
 {
     Versions = versions;
 }
Exemple #5
0
 public static Try <Lst <B> > Sequence <A, B>(this Lst <A> ta, Func <A, Try <B> > f) =>
 ta.Map(f).Sequence();
 public static Validation <MonoidFail, Fail, Lst <A> > Sequence <MonoidFail, Fail, A>(this Lst <Validation <MonoidFail, Fail, A> > ta)
     where MonoidFail : struct, Monoid <Fail>, Eq <Fail> =>
 ta.Traverse(identity);
Exemple #7
0
 public static State <S, Lst <A> > Sequence <S, A>(this Lst <State <S, A> > ma) =>
 SequenceFast(ma).Map(toList);
Exemple #8
0
 public static Aff <Lst <B> > TraverseParallel <A, B>(this Lst <Aff <A> > ma, Func <A, B> f) =>
 TraverseParallel <A, B>(ma, f, SysInfo.DefaultAsyncSequenceParallelism);
Exemple #9
0
 public Lst <PredList, PredItem, A> Append(Lst <PredList, PredItem, A> rhs) =>
 new Lst <PredList, PredItem, A>(Value.Append(rhs));
Exemple #10
0
 public Lst <A> Subtract(Lst <A> rhs) =>
 Wrap(Value.Subtract(rhs.Value));
Exemple #11
0
 public bool Equals(Lst <A> other) =>
 Value.Equals(other.Value);
Exemple #12
0
 public Lst <A> Append(Lst <A> rhs) =>
 new Lst <A>(Value.Append(rhs));
Exemple #13
0
 public static Aff <RT, Lst <B> > SequenceSerial <RT, A, B>(this Lst <A> ta, Func <A, Aff <RT, B> > f)
     where RT : struct, HasCancel <RT> =>
 ta.Map(f).SequenceSerial();
Exemple #14
0
 public static Aff <RT, Lst <B> > SequenceParallel <RT, A, B>(this Lst <A> ta, Func <A, Aff <RT, B> > f, int windowSize)
     where RT : struct, HasCancel <RT> =>
 ta.Map(f).SequenceParallel(windowSize);
Exemple #15
0
 public static Aff <Lst <A> > SequenceParallel <A>(this Lst <Aff <A> > ma) =>
 TraverseParallel <A, A>(ma, identity, SysInfo.DefaultAsyncSequenceParallelism);
Exemple #16
0
 public Lst <PredList, PredItem, A> Subtract(Lst <PredList, PredItem, A> rhs) =>
 Wrap(Value.Subtract(rhs.Value));
Exemple #17
0
 public static Set <Lst <B> > Traverse <A, B>(this Lst <Set <A> > ma, Func <A, B> f) =>
 toSet(CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToSystemArray(), f)
       .Map(toList));
Exemple #18
0
 public bool Equals(Lst <PredList, PredItem, A> other) =>
 Value.Equals(other.Value);
Exemple #19
0
 public static Validation <Fail, Lst <B> > Sequence <Fail, A, B>(this Lst <A> ta, Func <A, Validation <Fail, B> > f) =>
 ta.Map(f).Sequence();
Exemple #20
0
 public static Aff <Lst <A> > SequenceParallel <A>(this Lst <Aff <A> > ma, int windowSize) =>
 TraverseParallel <A, A>(ma, identity, windowSize);
Exemple #21
0
 public static State <S, Lst <B> > Traverse <S, A, B>(this Lst <State <S, A> > ma, Func <A, B> f) =>
 TraverseFast(ma, f).Map(toList);
Exemple #22
0
 public static Aff <Lst <A> > SequenceSerial <A>(this Lst <Aff <A> > ma) =>
 TraverseSerial <A, A>(ma, identity);
Exemple #23
0
 public static Lst <T> cons <T>(this T head, Lst <T> tail) =>
 tail.Insert(0, head);
Exemple #24
0
 public static Aff <Lst <B> > SequenceParallel <A, B>(this Lst <A> ta, Func <A, Aff <B> > f) =>
 ta.Map(f).SequenceParallel();
Exemple #25
0
 /// <summary>
 /// Convert an LanguageExt List (Lst T) into an F# List
 /// </summary>
 public static FSharpList <T> fs <T>(Lst <T> list) =>
 ListModule.OfSeq(list);
Exemple #26
0
 public static Aff <Lst <B> > SequenceParallel <A, B>(this Lst <A> ta, Func <A, Aff <B> > f, int windowSize) =>
 ta.Map(f).SequenceParallel(windowSize);
Exemple #27
0
 public static Task <Lst <A> > Sequence <A>(this Lst <Task <A> > ma) =>
 ma.Traverse(identity);
Exemple #28
0
 public static Aff <Lst <B> > SequenceSerial <A, B>(this Lst <A> ta, Func <A, Aff <B> > f) =>
 ta.Map(f).SequenceSerial();
Exemple #29
0
 public static Either <L, Lst <A> > Sequence <L, A>(this Lst <Either <L, A> > ta) =>
 ta.Traverse(identity);
Exemple #30
0
 public int CompareTo(Lst <PredList, PredItem, A> other) =>
 Value.CompareTo(other.Value);