예제 #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);
예제 #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));
        }
예제 #3
0
 public static OptionUnsafe <Lst <B> > Sequence <A, B>(this Lst <A> ta, Func <A, OptionUnsafe <B> > f) =>
 ta.Map(f).Sequence();
예제 #4
0
 /// <summary>
 /// Ctor
 /// </summary>
 VectorClock(Lst <ClockEntry> versions)
 {
     Versions = versions;
 }
예제 #5
0
 public static Try <Lst <B> > Sequence <A, B>(this Lst <A> ta, Func <A, Try <B> > f) =>
 ta.Map(f).Sequence();
예제 #6
0
 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);
예제 #7
0
 public static State <S, Lst <A> > Sequence <S, A>(this Lst <State <S, A> > ma) =>
 SequenceFast(ma).Map(toList);
예제 #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);
예제 #9
0
 public Lst <PredList, PredItem, A> Append(Lst <PredList, PredItem, A> rhs) =>
 new Lst <PredList, PredItem, A>(Value.Append(rhs));
예제 #10
0
 public Lst <A> Subtract(Lst <A> rhs) =>
 Wrap(Value.Subtract(rhs.Value));
예제 #11
0
 public bool Equals(Lst <A> other) =>
 Value.Equals(other.Value);
예제 #12
0
 public Lst <A> Append(Lst <A> rhs) =>
 new Lst <A>(Value.Append(rhs));
예제 #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();
예제 #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);
예제 #15
0
 public static Aff <Lst <A> > SequenceParallel <A>(this Lst <Aff <A> > ma) =>
 TraverseParallel <A, A>(ma, identity, SysInfo.DefaultAsyncSequenceParallelism);
예제 #16
0
 public Lst <PredList, PredItem, A> Subtract(Lst <PredList, PredItem, A> rhs) =>
 Wrap(Value.Subtract(rhs.Value));
예제 #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));
예제 #18
0
 public bool Equals(Lst <PredList, PredItem, A> other) =>
 Value.Equals(other.Value);
예제 #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();
예제 #20
0
 public static Aff <Lst <A> > SequenceParallel <A>(this Lst <Aff <A> > ma, int windowSize) =>
 TraverseParallel <A, A>(ma, identity, windowSize);
예제 #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);
예제 #22
0
 public static Aff <Lst <A> > SequenceSerial <A>(this Lst <Aff <A> > ma) =>
 TraverseSerial <A, A>(ma, identity);
예제 #23
0
 public static Lst <T> cons <T>(this T head, Lst <T> tail) =>
 tail.Insert(0, head);
예제 #24
0
 public static Aff <Lst <B> > SequenceParallel <A, B>(this Lst <A> ta, Func <A, Aff <B> > f) =>
 ta.Map(f).SequenceParallel();
예제 #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);
예제 #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);
예제 #27
0
 public static Task <Lst <A> > Sequence <A>(this Lst <Task <A> > ma) =>
 ma.Traverse(identity);
예제 #28
0
 public static Aff <Lst <B> > SequenceSerial <A, B>(this Lst <A> ta, Func <A, Aff <B> > f) =>
 ta.Map(f).SequenceSerial();
예제 #29
0
 public static Either <L, Lst <A> > Sequence <L, A>(this Lst <Either <L, A> > ta) =>
 ta.Traverse(identity);
예제 #30
0
 public int CompareTo(Lst <PredList, PredItem, A> other) =>
 Value.CompareTo(other.Value);