- ListInfo
- Lst <A>
- Empty = new Lst<A>(new A[0] { })
- Lst (IEnumerable<A> initial)
- IsEmpty
- Case
- head
- headOrNone
- tail
- tailOrNone
- item (int index)
- itemOrNone (int index)
- map <B> (Lens<A, B> lens)
- this []
- At (int index)
- Count
- Contains (A value)
- Contains <EqA> (A value)
- Add (A value)
- AddRange (IEnumerable<A> items)
- Clear ()
- GetEnumerator ()
- IndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null)
- Insert (int index, A value)
- InsertRange (int index, IEnumerable<A> items)
- LastIndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null)
- Remove (A value)
- Remove (A value, IEqualityComparer<A> equalityComparer)
- RemoveAll (Func<A, bool> pred)
- RemoveAt (int index)
- RemoveRange (int index, int count)
- SetItem (int index, A value)
- FindRange (int index, int count)
- ToSeq ()
- ToString ()
- ToFullString (string separator = ", ")
- ToFullArrayString (string separator = ", ")
- AsEnumerable ()
- Skip (int amount)
- Reverse ()
- Fold <S> (S state, Func<S, A, S> folder)
- Do (Action<A> f)
- Map <U> (Func<A, U> map)
- Filter (Func<A, bool> pred)
- + (Lst<A> lhs, A rhs)
- + (A lhs, Lst<A> rhs)
- + (Lst<A> lhs, Lst<A> rhs)
- Append (Lst<A> rhs)
- - (Lst<A> lhs, Lst<A> rhs)
- Subtract (Lst<A> rhs)
- Equals (object obj)
- GetHashCode ()
- CompareTo (object obj)
- Equals (Lst<A> other)
- == (Lst<A> lhs, Lst<A> rhs)
- != (Lst<A> lhs, Lst<A> rhs)
- < (Lst<A> lhs, Lst<A> rhs)
- <= (Lst<A> lhs, Lst<A> rhs)
- > (Lst<A> lhs, Lst<A> rhs)
- >= (Lst<A> lhs, Lst<A> rhs)
- ToArray ()
- CompareTo (Lst<A> other)
- ListExtensions
- Flatten <A> (this Lst<Lst<A>> ma)
- Flatten <A> (this IEnumerable<IEnumerable<A>> ma)
- ToSeq <A> (this IEnumerable<A> enumerable)
- ToSeq <A> (this IList<A> enumerable)
- ToSeq <A> (this A[] array)
- Append <A> (this IEnumerable<A> lhs, IEnumerable<A> rhs)
- Match <A, B> (this IEnumerable<A> list, Func<B> Empty, Func<Seq<A>, B> More)
- Match <A, B> (this IEnumerable<A> list, Func<B> Empty, Func<A, Seq<A>, B> More)
- Match <T, R> (this IEnumerable<T> list, Func<R> Empty, Func<T, R> One, Func<T, Seq<T>, R> More )
- Head <T> (this IEnumerable<T> list)
- HeadSafe <T> (this IEnumerable<T> list)
- HeadOrNone <T> (this IEnumerable<T> list)
- HeadOrLeft <L, R> (this IEnumerable<R> list, L left)
- HeadOrInvalid <Fail, Success> (this IEnumerable<Success> list, Fail fail)
- HeadOrInvalid <Fail, Success> (this IEnumerable<Success> list, Seq<Fail> fail)
- HeadOrInvalid <MonoidFail, Fail, Success> (this IEnumerable<Success> list, Fail fail)
- LastOrNone <A> (this IEnumerable<A> list)
- LastOrLeft <L, R> (this IEnumerable<R> list, L left)
- LastOrInvalid <Fail, Success> (this IEnumerable<Success> list, Fail fail)
- LastOrInvalid <Fail, Success> (this IEnumerable<Success> list, Seq<Fail> fail)
- LastOrInvalid <MonoidFail, Fail, Success> (this IEnumerable<Success> list, Fail fail)
- Init <A> (this IEnumerable<A> list)
- Tail <T> (this IEnumerable<T> list)
- Apply <A, B> (this IEnumerable<Func<A, B>> fabc, IEnumerable<A> fa)
- Intersperse <A> (this IEnumerable<A> ma, A value)
- Concat (this IEnumerable<string> xs)
- Apply <A, B> (this Func<A, B> fabc, IEnumerable<A> fa)
- Apply <A, B, C> (this IEnumerable<Func<A, B, C>> fabc, IEnumerable<A> fa)
- Apply <A, B, C> (this Func<A, B, C> fabc, IEnumerable<A> fa)
- Apply <A, B, C> (this IEnumerable<Func<A, B, C>> fabc, IEnumerable<A> fa, IEnumerable<B> fb)
- Apply <A, B, C> (this Func<A, B, C> fabc, IEnumerable<A> fa, IEnumerable<B> fb)
- Apply <A, B, C> (this IEnumerable<Func<A, Func<B, C>>> fabc, IEnumerable<A> fa)
- Apply <A, B, C> (this Func<A, Func<B, C>> fabc, IEnumerable<A> fa)
- Apply <A, B, C> (this IEnumerable<Func<A, Func<B, C>>> fabc, IEnumerable<A> fa, IEnumerable<B> fb)
- Apply <A, B, C> (this Func<A, Func<B, C>> fabc, IEnumerable<A> fa, IEnumerable<B> fb)
- Action <A, B> (this IEnumerable<A> fa, IEnumerable<B> fb)
- Map <T, R> (this IEnumerable<T> list, Func<T, R> map)
- Map <T, R> (this IEnumerable<T> list, Func<int, T, R> map)
- ParMap <T1, T2, R> (this IEnumerable<T1> list, Func<T1, T2, R> func)
- ParMap <T1, T2, T3, R> (this IEnumerable<T1> list, Func<T1, T2, T3, R> func)
- Filter <T> (this IEnumerable<T> list, Func<T, bool> predicate)
- Choose <T, R> (this IEnumerable<T> list, Func<T, Option<R>> selector)
- Choose <T, R> (this IEnumerable<T> list, Func<int, T, Option<R>> selector)
- Collect <T, R> (this IEnumerable<T> list, Func<T, IEnumerable<R>> map)
- Rev <T> (this IEnumerable<T> list)
- Rev <A> (this Lst<A> list)
- Rev <PredList, A> (this Lst<PredList, A> list)
- Rev <PredList, PredItem, A> (this Lst<PredList, PredItem, A> list)
- Fold <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder)
- FoldBack <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder)
- FoldWhile <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- FoldWhile <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- FoldBackWhile <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- FoldBackWhile <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- FoldUntil <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- FoldUntil <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- FoldBackUntil <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- FoldBackUntil <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- Reduce <T> (this IEnumerable<T> list, Func<T, T, T> reducer)
- ReduceBack <T> (this IEnumerable<T> list, Func<T, T, T> reducer)
- Scan <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder)
- ScanBack <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder)
- Zip <T, U> (this IEnumerable<T> list, IEnumerable<U> other)
- Find <T> (this IEnumerable<T> list, Func<T, bool> pred)
- FindSeq <T> (this IEnumerable<T> list, Func<T, bool> pred)
- Freeze <T> (this IEnumerable<T> list)
- Freeze <PredList, T> (this IEnumerable<T> list)
- Freeze <PredList, PredItem, T> (this IEnumerable<T> list)
- ToArr <A> (this IEnumerable<A> list)
- Length <T> (this IEnumerable<T> list)
- Iter <T> (this IEnumerable<T> list, Action<T> action)
- Iter <T> (this IEnumerable<T> list, Action<int, T> action)
- Consume <T> (this IEnumerable<T> list)
- ForAll <T> (this IEnumerable<T> list, Func<T, bool> pred)
- Distinct <EQ, T> (this IEnumerable<T> list)
- Exists <T> (this IEnumerable<T> list, Func<T, bool> pred)
- Tails <T> (this IEnumerable<T> self)
- Span <T> (this IEnumerable<T> self, Func<T, bool> pred)
- Bind <T, R> (this IEnumerable<T> self, Func<T, IEnumerable<R>> binder)
- Select <A, B> (this Lst<A> self, Func<A, B> map)
- Select <PredList, A, B> (this Lst<PredList, A> self, Func<A, B> map)
- BindEnumerable <A, B> (this Lst<A> self, Func<A, Lst<B>> binder)
- BindEnumerable <PredList, A, B> (this Lst<PredList, A> self, Func<A, Lst<PredList, B>> binder)
- BindEnumerable <PredList, PredItemA, PredItemB, A, B> (this Lst<PredList, PredItemA, A> self, Func<A, Lst<PredList, PredItemB, B>> binder)
- Bind <A, B> (this Lst<A> self, Func<A, Lst<B>> binder)
- Bind <PredList, A, B> (this Lst<PredList, A> self, Func<A, Lst<PredList, B>> binder)
- Bind <PredList, PredItemA, PredItemB, A, B> (this Lst<PredList, PredItemA, A> self, Func<A, Lst<PredList, PredItemB, B>> binder)
- Count <A> (this Lst<A> self)
- Count <PredList, A> (this Lst<PredList, A> self)
- Count <PredList, PredItem, A> (this Lst<PredList, PredItem, A> self)
- SelectMany <A, B, C> (this Lst<A> self, Func<A, Lst<B>> bind, Func<A, B, C> project)
- SelectMany <PredList, A, B, C> (this Lst<PredList, A> self, Func<A, Lst<PredList, B>> bind, Func<A, B, C> project)
- SkipLast <T> (this IEnumerable<T> self)
- SkipLast <T> (this IEnumerable<T> self, int n)
- ToOption <A> (this IEnumerable<A> self)
- ToTryOption <A> (this IEnumerable<A> self)
- Aggregate <TSource, TAccumulate> (this Lst<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func)
- Aggregate <TSource, TAccumulate, TResult> (this Lst<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, Func<TAccumulate, TResult> resultSelector)
- Aggregate <TSource> (this Lst<TSource> source, Func<TSource, TSource, TSource> func)
- All <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- Any <TSource> (this Lst<TSource> source)
- Any <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- AsEnumerable <TSource> (this Lst<TSource> source)
- AsQueryable <TElement> (this Lst<TElement> source)
- Average (this Lst<decimal> source)
- Average <TSource> (this Lst<TSource> source, Func<TSource, decimal> selector)
- Average (this Lst<decimal?> source)
- Average <TSource> (this Lst<TSource> source, Func<TSource, decimal?> selector)
- Average (this Lst<double> source)
- Average (this Lst<int> source)
- Average (this Lst<long> source)
- Average <TSource> (this Lst<TSource> source, Func<TSource, double> selector)
- Average <TSource> (this Lst<TSource> source, Func<TSource, int> selector)
- Average <TSource> (this Lst<TSource> source, Func<TSource, long> selector)
- Average (this Lst<double?> source)
- Average (this Lst<int?> source)
- Average (this Lst<long?> source)
- Average <TSource> (this Lst<TSource> source, Func<TSource, double?> selector)
- Average <TSource> (this Lst<TSource> source, Func<TSource, int?> selector)
- Average <TSource> (this Lst<TSource> source, Func<TSource, long?> selector)
- Average (this Lst<float> source)
- Average <TSource> (this Lst<TSource> source, Func<TSource, float> selector)
- Average (this Lst<float?> source)
- Average <TSource> (this Lst<TSource> source, Func<TSource, float?> selector)
- Concat <TSource> (this Lst<TSource> first, IEnumerable<TSource> second)
- Contains <TSource> (this Lst<TSource> source, TSource value)
- Contains <TSource> (this Lst<TSource> source, TSource value, IEqualityComparer<TSource> comparer)
- Count <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- DefaultIfEmpty <TSource> (this Lst<TSource> source)
- DefaultIfEmpty <TSource> (this Lst<TSource> source, TSource defaultValue)
- Distinct <TSource> (this Lst<TSource> source)
- Distinct <TSource> (this Lst<TSource> source, IEqualityComparer<TSource> comparer)
- ElementAt <TSource> (this Lst<TSource> source, int index)
- ElementAtOrDefault <TSource> (this Lst<TSource> source, int index)
- Except <TSource> (this Lst<TSource> first, IEnumerable<TSource> second)
- Except <TSource> (this Lst<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- First <TSource> (this Lst<TSource> source)
- First <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- FirstOrDefault <TSource> (this Lst<TSource> source)
- FirstOrDefault <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- GroupBy <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
- GroupBy <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
- GroupBy <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector)
- GroupBy <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
- GroupBy <TSource, TKey, TElement, TResult> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector)
- GroupBy <TSource, TKey, TElement, TResult> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey> comparer)
- GroupBy <TSource, TKey, TResult> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector)
- GroupBy <TSource, TKey, TResult> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey> comparer)
- GroupJoin <TOuter, TInner, TKey, TResult> (this Lst<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector)
- GroupJoin <TOuter, TInner, TKey, TResult> (this Lst<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey> comparer)
- Intersect <TSource> (this Lst<TSource> first, IEnumerable<TSource> second)
- Intersect <TSource> (this Lst<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- Join <TOuter, TInner, TKey, TResult> (this Lst<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector)
- Join <TOuter, TInner, TKey, TResult> (this Lst<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey> comparer)
- Last <TSource> (this Lst<TSource> source)
- Last <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- LastOrDefault <TSource> (this Lst<TSource> source)
- LastOrDefault <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- LongCount <TSource> (this Lst<TSource> source)
- LongCount <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- Max (this Lst<decimal> source)
- Max <TSource> (this Lst<TSource> source, Func<TSource, decimal> selector)
- Max (this Lst<decimal?> source)
- Max <TSource> (this Lst<TSource> source, Func<TSource, decimal?> selector)
- Max (this Lst<double> source)
- Max <TSource> (this Lst<TSource> source, Func<TSource, double> selector)
- Max (this Lst<double?> source)
- Max <TSource> (this Lst<TSource> source, Func<TSource, double?> selector)
- Max (this Lst<float> source)
- Max <TSource> (this Lst<TSource> source, Func<TSource, float> selector)
- Max (this Lst<float?> source)
- Max <TSource> (this Lst<TSource> source, Func<TSource, float?> selector)
- Max (this Lst<int> source)
- Max <TSource> (this Lst<TSource> source, Func<TSource, int> selector)
- Max (this Lst<int?> source)
- Max <TSource> (this Lst<TSource> source, Func<TSource, int?> selector)
- Max (this Lst<long> source)
- Max <TSource> (this Lst<TSource> source, Func<TSource, long> selector)
- Max (this Lst<long?> source)
- Max <TSource> (this Lst<TSource> source, Func<TSource, long?> selector)
- Max <TSource, TResult> (this Lst<TSource> source, Func<TSource, TResult> selector)
- Max <TSource> (this Lst<TSource> source)
- Min (this Lst<decimal> source)
- Min <TSource> (this Lst<TSource> source, Func<TSource, decimal> selector)
- Min (this Lst<decimal?> source)
- Min <TSource> (this Lst<TSource> source, Func<TSource, decimal?> selector)
- Min (this Lst<double> source)
- Min <TSource> (this Lst<TSource> source, Func<TSource, double> selector)
- Min (this Lst<double?> source)
- Min <TSource> (this Lst<TSource> source, Func<TSource, double?> selector)
- Min (this Lst<float> source)
- Min <TSource> (this Lst<TSource> source, Func<TSource, float> selector)
- Min (this Lst<float?> source)
- Min <TSource> (this Lst<TSource> source, Func<TSource, float?> selector)
- Min (this Lst<int> source)
- Min <TSource> (this Lst<TSource> source, Func<TSource, int> selector)
- Min (this Lst<int?> source)
- Min <TSource> (this Lst<TSource> source, Func<TSource, int?> selector)
- Min (this Lst<long> source)
- Min <TSource> (this Lst<TSource> source, Func<TSource, long> selector)
- Min (this Lst<long?> source)
- Min <TSource> (this Lst<TSource> source, Func<TSource, long?> selector)
- Min <TSource, TResult> (this Lst<TSource> source, Func<TSource, TResult> selector)
- Min <TSource> (this Lst<TSource> source)
- OrderBy <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector)
- OrderBy <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)
- OrderByDescending <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector)
- OrderByDescending <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)
- Reverse <TSource> (this Lst<TSource> source)
- SequenceEqual <TSource> (this Lst<TSource> first, IEnumerable<TSource> second)
- SequenceEqual <TSource> (this Lst<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- Single <TSource> (this Lst<TSource> source)
- Single <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- SingleOrDefault <TSource> (this Lst<TSource> source)
- SingleOrDefault <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- Skip <TSource> (this Lst<TSource> source, int count)
- SkipWhile <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- SkipWhile <TSource> (this Lst<TSource> source, Func<TSource, int, bool> predicate)
- Sum (this Lst<decimal> source)
- Sum <TSource> (this Lst<TSource> source, Func<TSource, decimal> selector)
- Sum (this Lst<decimal?> source)
- Sum <TSource> (this Lst<TSource> source, Func<TSource, decimal?> selector)
- Sum (this Lst<double> source)
- Sum <TSource> (this Lst<TSource> source, Func<TSource, double> selector)
- Sum (this Lst<double?> source)
- Sum <TSource> (this Lst<TSource> source, Func<TSource, double?> selector)
- Sum (this Lst<float> source)
- Sum <TSource> (this Lst<TSource> source, Func<TSource, float> selector)
- Sum (this Lst<float?> source)
- Sum <TSource> (this Lst<TSource> source, Func<TSource, float?> selector)
- Sum (this Lst<int> source)
- Sum <TSource> (this Lst<TSource> source, Func<TSource, int> selector)
- Sum (this Lst<int?> source)
- Sum <TSource> (this Lst<TSource> source, Func<TSource, int?> selector)
- Sum (this Lst<long> source)
- Sum <TSource> (this Lst<TSource> source, Func<TSource, long> selector)
- Sum (this Lst<long?> source)
- Sum <TSource> (this Lst<TSource> source, Func<TSource, long?> selector)
- Take <TSource> (this Lst<TSource> source, int count)
- TakeWhile <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate)
- TakeWhile <TSource> (this Lst<TSource> source, Func<TSource, int, bool> predicate)
- ToArray <TSource> (this Lst<TSource> source)
- ToDictionary <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
- ToDictionary <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
- ToDictionary <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector)
- ToDictionary <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
- ToList <TSource> (this Lst<TSource> source)
- ToLookup <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
- ToLookup <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
- ToLookup <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector)
- ToLookup <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
- Union <TSource> (this Lst<TSource> first, IEnumerable<TSource> second)
- Union <TSource> (this Lst<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- Zip <TFirst, TSecond, TResult> (this Lst<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)
- ListEnumerator <T>
- List
- flatten <A> (Lst<Lst<A>> ma)
- flatten <A> (IEnumerable<IEnumerable<A>> ma)
- empty <T> ()
- create <T> ()
- create <T> (params T[] items)
- createRange <T> (IEnumerable<T> items)
- generate <T> (int count, Func<int, T> generator)
- generate <T> (Func<int, T> generator)
- repeat <T> (T item, int count)
- add <T> (Lst<T> list, T value)
- addRange <T> (Lst<T> list, IEnumerable<T> value)
- remove <T> (Lst<T> list, T value)
- removeAt <T> (Lst<T> list, int index)
- head <T> (IEnumerable<T> list)
- headOrNone <A> (IEnumerable<A> list)
- headOrLeft <L, R> (IEnumerable<R> list, L left)
- headOrInvalid <Fail, Success> (IEnumerable<Success> list, Fail fail)
- headOrInvalid <Fail, Success> (IEnumerable<Success> list, Seq<Fail> fail)
- headOrInvalid <MonoidFail, Fail, Success> (IEnumerable<Success> list, Fail fail)
- last <A> (IEnumerable<A> list)
- lastOrNone <A> (IEnumerable<A> list)
- lastOrLeft <L, R> (IEnumerable<R> list, L left)
- lastOrInvalid <Fail, Success> (IEnumerable<Success> list, Fail fail)
- lastOrInvalid <Fail, Success> (IEnumerable<Success> list, Seq<Fail> fail)
- lastOrInvalid <MonoidFail, Fail, Success> (IEnumerable<Success> list, Fail fail)
- init <A> (IEnumerable<A> list)
- tail <T> (IEnumerable<T> list)
- map <T, R> (IEnumerable<T> list, Func<T, R> map)
- parmap <T1, T2, R> (IEnumerable<T1> list, Func<T1, T2, R> func)
- parmap <T1, T2, T3, R> (IEnumerable<T1> list, Func<T1, T2, T3, R> func)
- map <T, R> (IEnumerable<T> list, Func<int, T, R> map)
- filter <T> (IEnumerable<T> list, Func<T, bool> predicate)
- choose <T, R> (IEnumerable<T> list, Func<T, Option<R>> selector)
- choose <T, R> (IEnumerable<T> list, Func<int, T, Option<R>> selector)
- collect <T, R> (IEnumerable<T> list, Func<T, IEnumerable<R>> map)
- sum (IEnumerable<int> list)
- sum (IEnumerable<float> list)
- sum (IEnumerable<double> list)
- sum (IEnumerable<decimal> list)
- rev <T> (IEnumerable<T> list)
- rev <T> (Lst<T> list)
- rev <PredList, T> (Lst<PredList, T> list)
- rev <PredList, PredItem, T> (Lst<PredList, PredItem, T> list)
- append <T> (IEnumerable<T> lhs, IEnumerable<T> rhs)
- append <T> (IEnumerable<T> x, IEnumerable<IEnumerable<T>> xs)
- append <T> (params IEnumerable<T>[] lists)
- fold <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder)
- foldBack <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder)
- foldWhile <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- foldWhile <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- foldBackWhile <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- foldBackWhile <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- foldUntil <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- foldUntil <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- foldBackUntil <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- foldBackUntil <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- reduce <A> (IEnumerable<A> list, Func<A, A, A> reducer)
- reduceOrNone <A> (IEnumerable<A> list, Func<A, A, A> reducer)
- reduceBack <A> (IEnumerable<A> list, Func<A, A, A> reducer)
- reduceBackOrNone <A> (IEnumerable<A> list, Func<A, A, A> reducer)
- scan <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder)
- scanBack <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder)
- find <T> (IEnumerable<T> list, Func<T, bool> pred)
- findSeq <T> (IEnumerable<T> list, Func<T, bool> pred)
- freeze <T> (IEnumerable<T> list)
- freeze <PredList, T> (IEnumerable<T> list)
- freeze <PredList, PredItem, T> (IEnumerable<T> list)
- zip <T, U, V> (IEnumerable<T> list, IEnumerable<U> other, Func<T, U, V> zipper)
- zip <T, U> (IEnumerable<T> list, IEnumerable<U> other)
- length <T> (IEnumerable<T> list)
- iter <T> (IEnumerable<T> list, Action<T> action)
- iter <T> (IEnumerable<T> list, Action<int, T> action)
- consume <T> (IEnumerable<T> list)
- forall <T> (IEnumerable<T> list, Func<T, bool> pred)
- distinct <T> (IEnumerable<T> list)
- distinct <EQ, T> (IEnumerable<T> list)
- distinct <T, K> (IEnumerable<T> list, Func<T, K> keySelector, Option<Func<K, K, bool>> compare = default(Option<Func<K, K, bool>>))
- take <T> (IEnumerable<T> list, int count)
- takeWhile <T> (IEnumerable<T> list, Func<T, bool> pred)
- takeWhile <T> (IEnumerable<T> list, Func<T, int, bool> pred)
- unfold <S> (S state, Func<S, Option<S>> unfolder)
- unfold <S, A> (S state, Func<S, Option<(A, S)>> unfolder)
- unfold <S1, S2, A> ((S1, S2) state, Func<S1, S2, Option<(A, S1, S2)>> unfolder)
- unfold <S1, S2, S3, A> ((S1, S2, S3) state, Func<S1, S2, S3, Option<(A, S1, S2, S3)>> unfolder)
- unfold <S1, S2, S3, S4, A> ((S1, S2, S3, S4) state, Func<S1, S2, S3, S4, Option<(A, S1, S2, S3, S4)>> unfolder)
- exists <T> (IEnumerable<T> list, Func<T, bool> pred)
- headSafe <T> (IEnumerable<T> list)
- apply <A, B> (IEnumerable<Func<A, B>> fabc, IEnumerable<A> fa)
- apply <A, B> (Func<A, B> fabc, IEnumerable<A> fa)
- apply <A, B, C> (IEnumerable<Func<A, B, C>> fabc, IEnumerable<A> fa)
- apply <A, B, C> (Func<A, B, C> fabc, IEnumerable<A> fa)
- apply <A, B, C> ( IEnumerable<Func<A, B, C>> fabc, IEnumerable<A> fa, IEnumerable<B> fb)
- apply <A, B, C> (Func<A, B, C> fabc, IEnumerable<A> fa, IEnumerable<B> fb)
- apply <A, B, C> (IEnumerable<Func<A, Func<B, C>>> fabc, IEnumerable<A> fa)
- apply <A, B, C> (Func<A, Func<B, C>> fabc, IEnumerable<A> fa)
- apply <A, B, C> (IEnumerable<Func<A, Func<B, C>>> fabc, IEnumerable<A> fa, IEnumerable<B> fb)
- apply <A, B, C> (Func<A, Func<B, C>> fabc, IEnumerable<A> fa, IEnumerable<B> fb)
- action <A, B> (IEnumerable<A> fa, IEnumerable<B> fb)
- tails <T> (IEnumerable<T> self)
- span <T> (IEnumerable<T> self, Func<T, bool> pred)
- Lst <PRED, A>
- Lst (IEnumerable<A> initial)
- IsEmpty
- Case
- this []
- Count
- Contains (A value)
- Contains <EqA> (A value)
- Add (A value)
- AddRange (IEnumerable<A> items)
- GetEnumerator ()
- IndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null)
- Insert (int index, A value)
- InsertRange (int index, IEnumerable<A> items)
- LastIndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null)
- Remove (A value)
- Remove (A value, IEqualityComparer<A> equalityComparer)
- RemoveAll (Func<A, bool> pred)
- RemoveAt (int index)
- RemoveRange (int index, int count)
- SetItem (int index, A value)
- FindRange (int index, int count)
- ToSeq ()
- ToString ()
- ToFullString (string separator = ", ")
- ToFullArrayString (string separator = ", ")
- AsEnumerable ()
- Skip (int amount)
- Reverse ()
- Fold <S> (S state, Func<S, A, S> folder)
- Map <U> (Func<A, U> map)
- Filter (Func<A, bool> pred)
- + (Lst<PRED, A> lhs, A rhs)
- + (A lhs, Lst<PRED, A> rhs)
- + (Lst<PRED, A> lhs, Lst<PRED, A> rhs)
- Append (Lst<PRED, A> rhs)
- - (Lst<PRED, A> lhs, Lst<PRED, A> rhs)
- Subtract (Lst<PRED, A> rhs)
- Equals (object obj)
- GetHashCode ()
- CompareTo (object obj)
- Equals (Lst<PRED, A> other)
- == (Lst<PRED, A> lhs, Lst<PRED, A> rhs)
- != (Lst<PRED, A> lhs, Lst<PRED, A> rhs)
- < (Lst<PRED, A> lhs, Lst<PRED, A> rhs)
- <= (Lst<PRED, A> lhs, Lst<PRED, A> rhs)
- > (Lst<PRED, A> lhs, Lst<PRED, A> rhs)
- >= (Lst<PRED, A> lhs, Lst<PRED, A> rhs)
- ToArray ()
- CompareTo (Lst<PRED, A> other)
- Lst <PredList, PredItem, A>
- Lst (IEnumerable<A> initial)
- IsEmpty
- Case
- this []
- Count
- Contains (A value)
- Contains <EqA> (A value)
- Add (A value)
- AddRange (IEnumerable<A> items)
- FindRange (int index, int count)
- GetEnumerator ()
- ToSeq ()
- ToString ()
- ToFullString (string separator = ", ")
- ToFullArrayString (string separator = ", ")
- AsEnumerable ()
- IndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null)
- Insert (int index, A value)
- InsertRange (int index, IEnumerable<A> items)
- LastIndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null)
- Remove (A value)
- Remove (A value, IEqualityComparer<A> equalityComparer)
- RemoveAll (Func<A, bool> pred)
- RemoveAt (int index)
- RemoveRange (int index, int count)
- SetItem (int index, A value)
- Skip (int amount)
- Reverse ()
- Fold <S> (S state, Func<S, A, S> folder)
- Map <PREDU, U> (Func<A, U> map)
- Map (Func<A, A> map)
- Filter (Func<A, bool> pred)
- + (Lst<PredList, PredItem, A> lhs, A rhs)
- + (A lhs, Lst<PredList, PredItem, A> rhs)
- + (Lst<PredList, PredItem, A> lhs, Lst<PredList, PredItem, A> rhs)
- Append (Lst<PredList, PredItem, A> rhs)
- - (Lst<PredList, PredItem, A> lhs, Lst<PredList, PredItem, A> rhs)
- Subtract (Lst<PredList, PredItem, A> rhs)
- Equals (object obj)
- GetHashCode ()
- CompareTo (object obj)
- Equals (Lst<PredList, PredItem, A> other)
- == (Lst<PredList, PredItem, A> lhs, Lst<PredList, PredItem, A> rhs)
- != (Lst<PredList, PredItem, A> lhs, Lst<PredList, PredItem, A> rhs)
- < (Lst<PredList, PredItem, A> lhs, Lst<PredList, PredItem, A> rhs)
- <= (Lst<PredList, PredItem, A> lhs, Lst<PredList, PredItem, A> rhs)
- > (Lst<PredList, PredItem, A> lhs, Lst<PredList, PredItem, A> rhs)
- >= (Lst<PredList, PredItem, A> lhs, Lst<PredList, PredItem, A> rhs)
- ToArray ()
- CompareTo (Lst<PredList, PredItem, A> other)
Immutable list
type | A | Value type |
field Lst<A> Empty = new Lst<A>(new A[0] { }) Source #
Empty list
Reference version for use in pattern-matching
Empty collection = null
Singleton collection = A
More = (A, Seq<A>) -- head and tail
Example:
var res = list.Case switch
{
A value => ...,
(var x, var xs) => ...,
_ => ...
}
property Lens<Lst<A>, Option<A>> headOrNone Source #
Head or none lens
property Lens<Lst<A>, Option<A>> tailOrNone Source #
Tail or none lens
method Lens<Lst<A>, Option<A>> itemOrNone (int index) Source #
Item or none at index lens
method bool Contains (A value) Source #
Find if a value is in the collection
param | value | Value to test |
returns | True if collection contains value |
method bool Contains <EqA> (A value) Source #
Contains with provided Eq class instance
type | EqA | Eq class instance |
param | value | Value to test |
returns | True if collection contains value |
method ListEnumerator<A> GetEnumerator () Source #
Get enumerator
method int IndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null) Source #
Find the index of an item
method Lst<A> InsertRange (int index, IEnumerable<A> items) Source #
Insert range of values at specified index
method int LastIndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null) Source #
Find the last index of an item in the list
method Lst<A> Remove (A value, IEqualityComparer<A> equalityComparer) Source #
Remove all items that match the value from the list
method Lst<A> RemoveRange (int index, int count) Source #
Remove a range of items
method IEnumerable<A> FindRange (int index, int count) Source #
Returns an enumerable range from the collection. This is the fastest way of iterating sub-ranges of the collection.
param | index | Index into the collection |
param | count | Number of items to find |
returns | IEnumerable of items |
method string ToString () Source #
Format the collection as [a, b, c, ...]
The elipsis is used for collections over 50 items
To get a formatted string with all the items, use ToFullString
or ToFullArrayString
.
method string ToFullString (string separator = ", ") Source #
Format the collection as a, b, c, ...
method string ToFullArrayString (string separator = ", ") Source #
Format the collection as [a, b, c, ...]
method IEnumerable<A> AsEnumerable () Source #
method Lst<A> Do (Action<A> f) Source #
Impure iteration of the bound values in the structure
returns | Returns the original unmodified structure |
method int GetHashCode () Source #
Get the hash code Lazily (and once only) calculates the hash from the elements in the list Empty list hash == 0
class ListExtensions Source #
method IEnumerable<A> Append <A> (this IEnumerable<A> lhs, IEnumerable<A> rhs) Source #
Concatenate two enumerables (Concat in LINQ)
type | A | Enumerable item type |
param | lhs | First enumerable |
param | rhs | Second enumerable |
returns | Concatenated enumerable |
method B Match <A, B> (this IEnumerable<A> list, Func<B> Empty, Func<Seq<A>, B> More) Source #
Match empty list, or multi-item list
type | B | Return value type |
param | Empty | Match for an empty list |
param | More | Match for a non-empty |
returns | Result of match function invoked |
method B Match <A, B> (this IEnumerable<A> list, Func<B> Empty, Func<A, Seq<A>, B> More) Source #
List pattern matching
method R Match <T, R> (this IEnumerable<T> list, Func<R> Empty, Func<T, R> One, Func<T, Seq<T>, R> More ) Source #
List pattern matching
method T Head <T> (this IEnumerable<T> list) Source #
Get the item at the head (first) of the list
param | list | List |
returns | Head item |
method Option<T> HeadOrNone <T> (this IEnumerable<T> list) Source #
Get the item at the head (first) of the list or None if the list is empty
param | list | List |
returns | Optional head item |
method Either<L, R> HeadOrLeft <L, R> (this IEnumerable<R> list, L left) Source #
Get the item at the head (first) of the list or Left if the list is empty
param | list | List |
returns | Either head item or left |
method Validation<Fail, Success> HeadOrInvalid <Fail, Success> (this IEnumerable<Success> list, Fail fail) Source #
Get the item at the head (first) of the list or fail if the list is empty
param | list | List |
returns | Either head item or fail |
method Validation<Fail, Success> HeadOrInvalid <Fail, Success> (this IEnumerable<Success> list, Seq<Fail> fail) Source #
Get the item at the head (first) of the list or fail if the list is empty
param | list | List |
returns | Either head item or fail |
method Validation<MonoidFail, Fail, Success> HeadOrInvalid <MonoidFail, Fail, Success> (this IEnumerable<Success> list, Fail fail) Source #
Get the item at the head (first) of the list or fail if the list is empty
param | list | List |
returns | Either head item or fail |
method Option<A> LastOrNone <A> (this IEnumerable<A> list) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Either<L, R> LastOrLeft <L, R> (this IEnumerable<R> list, L left) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Validation<Fail, Success> LastOrInvalid <Fail, Success> (this IEnumerable<Success> list, Fail fail) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Validation<Fail, Success> LastOrInvalid <Fail, Success> (this IEnumerable<Success> list, Seq<Fail> fail) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Validation<MonoidFail, Fail, Success> LastOrInvalid <MonoidFail, Fail, Success> (this IEnumerable<Success> list, Fail fail) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Seq<A> Init <A> (this IEnumerable<A> list) Source #
Get all items in the list except the last one
Must evaluate the last item to know it's the last, but won't return it
param | list | List |
returns | The initial items (all but the last) |
method IEnumerable<T> Tail <T> (this IEnumerable<T> list) Source #
Get the tail of the list (skips the head item)
param | list | List |
returns | Enumerable of T |
method IEnumerable<B> Apply <A, B> (this IEnumerable<Func<A, B>> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions
param | fabc | IEnumerable of functions |
param | fa | IEnumerable of argument values |
returns | Returns the result of applying the IEnumerable argument values to the IEnumerable functions |
method IEnumerable<A> Intersperse <A> (this IEnumerable<A> ma, A value) Source #
Inject a value in between each item in the enumerable
type | A | Bound type |
param | ma | Enumerable to inject values into |
param | value | Item to inject |
returns | An enumerable with the values injected |
method IEnumerable<B> Apply <A, B> (this Func<A, B> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions
param | fabc | IEnumerable of functions |
param | fa | IEnumerable of argument values |
returns | Returns the result of applying the IEnumerable argument values to the IEnumerable functions |
method IEnumerable<Func<B, C>> Apply <A, B, C> (this IEnumerable<Func<A, B, C>> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
returns | Returns the result of applying the IEnumerable of argument values to the IEnumerable of functions: an IEnumerable of functions of arity 1 |
method IEnumerable<Func<B, C>> Apply <A, B, C> (this Func<A, B, C> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
returns | Returns the result of applying the IEnumerable of argument values to the IEnumerable of functions: an IEnumerable of functions of arity 1 |
method IEnumerable<C> Apply <A, B, C> (this IEnumerable<Func<A, B, C>> fabc, IEnumerable<A> fa, IEnumerable<B> fb) Source #
Apply IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
param | fb | IEnumerable argument values |
returns | Returns the result of applying the IEnumerables of arguments to the IEnumerable of functions |
method IEnumerable<C> Apply <A, B, C> (this Func<A, B, C> fabc, IEnumerable<A> fa, IEnumerable<B> fb) Source #
Apply IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
param | fb | IEnumerable argument values |
returns | Returns the result of applying the IEnumerables of arguments to the IEnumerable of functions |
method IEnumerable<Func<B, C>> Apply <A, B, C> (this IEnumerable<Func<A, Func<B, C>>> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
returns | Returns the result of applying the IEnumerable of argument values to the IEnumerable of functions: an IEnumerable of functions of arity 1 |
method IEnumerable<Func<B, C>> Apply <A, B, C> (this Func<A, Func<B, C>> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
returns | Returns the result of applying the IEnumerable of argument values to the IEnumerable of functions: an IEnumerable of functions of arity 1 |
method IEnumerable<C> Apply <A, B, C> (this IEnumerable<Func<A, Func<B, C>>> fabc, IEnumerable<A> fa, IEnumerable<B> fb) Source #
Apply IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
param | fb | IEnumerable argument values |
returns | Returns the result of applying the IEnumerables of arguments to the IEnumerable of functions |
method IEnumerable<C> Apply <A, B, C> (this Func<A, Func<B, C>> fabc, IEnumerable<A> fa, IEnumerable<B> fb) Source #
Apply IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
param | fb | IEnumerable argument values |
returns | Returns the result of applying the IEnumerables of arguments to the IEnumerable of functions |
method IEnumerable<B> Action <A, B> (this IEnumerable<A> fa, IEnumerable<B> fb) Source #
Evaluate fa, then fb, ignoring the result of fa
param | fa | Applicative to evaluate first |
param | fb | Applicative to evaluate second and then return |
returns | Applicative of type FB derived from Applicative of B |
method IEnumerable<R> Map <T, R> (this IEnumerable<T> list, Func<T, R> map) Source #
Projects the values in the enumerable using a map function into a new enumerable (Select in LINQ).
type | T | Enumerable item type |
type | R | Return enumerable item type |
param | list | Enumerable to map |
param | map | Map function |
returns | Mapped enumerable |
method IEnumerable<R> Map <T, R> (this IEnumerable<T> list, Func<int, T, R> map) Source #
Projects the values in the enumerable into a new enumerable using a map function, which is also given an index value (Select in LINQ - note that the order of the arguments of the map function are the other way around, here the index is the first argument).
type | T | Enumerable item type |
type | R | Return enumerable item type |
param | list | Enumerable to map |
param | map | Map function |
returns | Mapped enumerable |
method IEnumerable<Func<T2, R>> ParMap <T1, T2, R> (this IEnumerable<T1> list, Func<T1, T2, R> func) Source #
Partial application map
method IEnumerable<Func<T2, Func<T3, R>>> ParMap <T1, T2, T3, R> (this IEnumerable<T1> list, Func<T1, T2, T3, R> func) Source #
Partial application map
method IEnumerable<T> Filter <T> (this IEnumerable<T> list, Func<T, bool> predicate) Source #
Removes items from the list that do not match the given predicate (Where in LINQ)
type | T | Enumerable item type |
param | list | Enumerable to filter |
param | predicate | Predicate function |
returns | Filtered enumerable |
method IEnumerable<R> Choose <T, R> (this IEnumerable<T> list, Func<T, Option<R>> selector) Source #
Applies the given function 'selector' to each element of the list. Returns the list comprised of the results for each element where the function returns Some(f(x)).
type | T | Enumerable item type |
param | list | Enumerable |
param | selector | Selector function |
returns | Mapped and filtered enumerable |
method IEnumerable<R> Choose <T, R> (this IEnumerable<T> list, Func<int, T, Option<R>> selector) Source #
Applies the given function 'selector' to each element of the list. Returns the list comprised of the results for each element where the function returns Some(f(x)).
type | T | Enumerable item type |
param | list | Enumerable |
param | selector | Selector function |
returns | Mapped and filtered enumerable |
method IEnumerable<R> Collect <T, R> (this IEnumerable<T> list, Func<T, IEnumerable<R>> map) Source #
For each element of the list, applies the given function. Concatenates all the results and returns the combined list.
type | T | Enumerable item type |
type | R | Return enumerable item type |
param | list | Enumerable to map |
param | map | Map function |
returns | Mapped enumerable |
method IEnumerable<T> Rev <T> (this IEnumerable<T> list) Source #
Reverses the enumerable (Reverse in LINQ)
type | T | Enumerable item type |
param | list | Enumerable to reverse |
returns | Reversed enumerable |
method Lst<A> Rev <A> (this Lst<A> list) Source #
Reverses the list (Reverse in LINQ)
type | A | List item type |
param | list | Listto reverse |
returns | Reversed list |
method Lst<PredList, A> Rev <PredList, A> (this Lst<PredList, A> list) Source #
Reverses the list (Reverse in LINQ)
type | A | List item type |
param | list | Listto reverse |
returns | Reversed list |
method Lst<PredList, PredItem, A> Rev <PredList, PredItem, A> (this Lst<PredList, PredItem, A> list) Source #
Reverses the list (Reverse in LINQ)
type | A | List item type |
param | list | Listto reverse |
returns | Reversed list |
method S Fold <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder) Source #
Applies a function 'folder' to each element of the collection, threading an accumulator argument through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result. (Aggregate in LINQ)
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Aggregate value |
method S FoldBack <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder) Source #
Applies a function 'folder' to each element of the collection (from last element to first), threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Aggregate value |
method S FoldWhile <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the collection whilst the predicate function returns True for the item being processed, threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S FoldWhile <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the collection, threading an accumulator argument through the computation (and whilst the predicate function returns True when passed the aggregate state). The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method S FoldBackWhile <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the collection (from last element to first) whilst the predicate function returns True for the item being processed, threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S FoldBackWhile <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the collection (from last element to first), threading an accumulator argument through the computation (and whilst the predicate function returns True when passed the aggregate state). The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method S FoldUntil <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the collection whilst the predicate function returns False for the item being processed, threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S FoldUntil <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the collection, threading an accumulator argument through the computation (and whilst the predicate function returns False when passed the aggregate state). The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method S FoldBackUntil <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the collection (from last element to first) whilst the predicate function returns False for the item being processed, threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S FoldBackUntil <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the collection (from last element to first), threading an accumulator argument through the computation (and whilst the predicate function returns False when passed the aggregate state). The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method T Reduce <T> (this IEnumerable<T> list, Func<T, T, T> reducer) Source #
Applies a function to each element of the collection (from last element to first), threading an accumulator argument through the computation. This function first applies the function to the first two elements of the list. Then, it passes this result into the function along with the third element and so on. Finally, it returns the final result.
type | T | Enumerable item type |
param | list | Enumerable to reduce |
param | reducer | Reduce function |
returns | Aggregate value |
method T ReduceBack <T> (this IEnumerable<T> list, Func<T, T, T> reducer) Source #
Applies a function to each element of the collection, threading an accumulator argument through the computation. This function first applies the function to the first two elements of the list. Then, it passes this result into the function along with the third element and so on. Finally, it returns the final result.
type | T | Enumerable item type |
param | list | Enumerable to reduce |
param | reducer | Reduce function |
returns | Aggregate value |
method IEnumerable<S> Scan <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder) Source #
Applies a function to each element of the collection, threading an accumulator argument through the computation. This function takes the state argument, and applies the function to it and the first element of the list. Then, it passes this result into the function along with the second element, and so on. Finally, it returns the list of intermediate results and the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Folding function |
returns | Aggregate state |
method IEnumerable<S> ScanBack <S, T> (this IEnumerable<T> list, S state, Func<S, T, S> folder) Source #
Applies a function to each element of the collection (from last element to first), threading an accumulator argument through the computation. This function takes the state argument, and applies the function to it and the first element of the list. Then, it passes this result into the function along with the second element, and so on. Finally, it returns the list of intermediate results and the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Folding function |
returns | Aggregate state |
method IEnumerable<(T, U)> Zip <T, U> (this IEnumerable<T> list, IEnumerable<U> other) Source #
Joins two enumerables together either into a single enumerable of tuples
param | list | First list to join |
param | other | Second list to join |
param | zipper | Join function |
returns | Joined enumerable |
method Option<T> Find <T> (this IEnumerable<T> list, Func<T, bool> pred) Source #
Returns Some(x) for the first item in the list that matches the predicate provided, None otherwise.
type | T | Enumerable item type |
param | list | Enumerable to search |
param | pred | Predicate |
returns | Some(x) for the first item in the list that matches the predicate provided, None otherwise. |
method IEnumerable<T> FindSeq <T> (this IEnumerable<T> list, Func<T, bool> pred) Source #
Returns [x] for the first item in the list that matches the predicate provided, [] otherwise.
type | T | Enumerable item type |
param | list | Enumerable to search |
param | pred | Predicate |
returns | [x] for the first item in the list that matches the predicate provided, [] otherwise. |
method Lst<T> Freeze <T> (this IEnumerable<T> list) Source #
Convert any enumerable into an immutable Lst T
type | T | Enumerable item type |
param | list | Enumerable to convert |
returns | Lst of T |
method Lst<PredList, T> Freeze <PredList, T> (this IEnumerable<T> list) Source #
Convert any enumerable into an immutable Lst T
type | T | Enumerable item type |
param | list | Enumerable to convert |
returns | Lst of T |
method Lst<PredList, PredItem, T> Freeze <PredList, PredItem, T> (this IEnumerable<T> list) Source #
Convert any enumerable into an immutable Lst T
type | T | Enumerable item type |
param | list | Enumerable to convert |
returns | Lst of T |
method Arr<A> ToArr <A> (this IEnumerable<A> list) Source #
Convert the enumerable to an immutable array
method int Length <T> (this IEnumerable<T> list) Source #
Returns the number of items in the Lst T
type | T | Item type |
param | list | List to count |
returns | The number of items in the list |
method Unit Iter <T> (this IEnumerable<T> list, Action<T> action) Source #
Invokes an action for each item in the enumerable in order
type | T | Enumerable item type |
param | list | Enumerable to iterate |
param | action | Action to invoke with each item |
returns | Unit |
method Unit Iter <T> (this IEnumerable<T> list, Action<int, T> action) Source #
Invokes an action for each item in the enumerable in order
type | T | Enumerable item type |
param | list | Enumerable to iterate |
param | action | Action to invoke with each item |
returns | Unit |
method Unit Consume <T> (this IEnumerable<T> list) Source #
Iterate each item in the enumerable in order (consume items)
type | T | Enumerable item type |
param | list | Enumerable to consume |
returns | Unit |
method bool ForAll <T> (this IEnumerable<T> list, Func<T, bool> pred) Source #
Returns true if all items in the enumerable match a predicate (Any in LINQ)
type | T | Enumerable item type |
param | list | Enumerable to test |
param | pred | Predicate |
returns | True if all items in the enumerable match the predicate |
method IEnumerable<T> Distinct <EQ, T> (this IEnumerable<T> list) Source #
Return a new enumerable with all duplicate values removed
type | T | Enumerable item type |
param | list | Enumerable |
returns | A new enumerable with all duplicate values removed |
method bool Exists <T> (this IEnumerable<T> list, Func<T, bool> pred) Source #
Returns true if any item in the enumerable matches the predicate provided
type | T | Enumerable item type |
param | list | Enumerable to test |
param | pred | Predicate |
returns | True if any item in the enumerable matches the predicate provided |
method IEnumerable<IEnumerable<T>> Tails <T> (this IEnumerable<T> self) Source #
The tails function returns all final segments of the argument, longest first. For example, i.e. tails(['a','b','c']) == [['a','b','c'], ['b','c'], ['c'],[]]
type | T | List item type |
param | self | List |
returns | Enumerable of Enumerables of T |
method (IEnumerable<T>, IEnumerable<T>) Span <T> (this IEnumerable<T> self, Func<T, bool> pred) Source #
Span, applied to a predicate 'pred' and a list, returns a tuple where first element is longest prefix (possibly empty) of elements that satisfy 'pred' and second element is the remainder of the list:
type | T | List element type |
param | self | List |
param | pred | Predicate |
returns | Split list |
List.span(List(1,2,3,4,1,2,3,4), x => x < 3) == (List(1,2),List(3,4,1,2,3,4))
List.span(List(1,2,3), x => x < 9) == (List(1,2,3),List())
List.span(List(1,2,3), x => x < 0) == (List(),List(1,2,3))
method IEnumerable<R> Bind <T, R> (this IEnumerable<T> self, Func<T, IEnumerable<R>> binder) Source #
Monadic bind function for IEnumerable
method Lst<B> Select <A, B> (this Lst<A> self, Func<A, B> map) Source #
LINQ Select implementation for Lst
method Lst<PredList, B> Select <PredList, A, B> (this Lst<PredList, A> self, Func<A, B> map) Source #
LINQ Select implementation for Lst
method IEnumerable<B> BindEnumerable <A, B> (this Lst<A> self, Func<A, Lst<B>> binder) Source #
Monadic bind function for Lst that returns an IEnumerable
method IEnumerable<B> BindEnumerable <PredList, A, B> (this Lst<PredList, A> self, Func<A, Lst<PredList, B>> binder) Source #
Monadic bind function for Lst that returns an IEnumerable
method IEnumerable<B> BindEnumerable <PredList, PredItemA, PredItemB, A, B> (this Lst<PredList, PredItemA, A> self, Func<A, Lst<PredList, PredItemB, B>> binder) Source #
Monadic bind function for Lst that returns an IEnumerable
method Lst<PredList, B> Bind <PredList, A, B> (this Lst<PredList, A> self, Func<A, Lst<PredList, B>> binder) Source #
Monadic bind function
method Lst<PredList, PredItemB, B> Bind <PredList, PredItemA, PredItemB, A, B> (this Lst<PredList, PredItemA, A> self, Func<A, Lst<PredList, PredItemB, B>> binder) Source #
Monadic bind function
method int Count <A> (this Lst<A> self) Source #
Returns the number of items in the Lst T
type | A | Item type |
param | list | List to count |
returns | The number of items in the list |
method int Count <PredList, A> (this Lst<PredList, A> self) Source #
Returns the number of items in the Lst T
type | A | Item type |
param | list | List to count |
returns | The number of items in the list |
method int Count <PredList, PredItem, A> (this Lst<PredList, PredItem, A> self) Source #
Returns the number of items in the Lst T
type | A | Item type |
param | list | List to count |
returns | The number of items in the list |
method Lst<C> SelectMany <A, B, C> (this Lst<A> self, Func<A, Lst<B>> bind, Func<A, B, C> project) Source #
LINQ bind implementation for Lst
method Lst<PredList, C> SelectMany <PredList, A, B, C> (this Lst<PredList, A> self, Func<A, Lst<PredList, B>> bind, Func<A, B, C> project) Source #
LINQ bind implementation for Lst
method IEnumerable<T> SkipLast <T> (this IEnumerable<T> self) Source #
Take all but the last item in an enumerable
type | T | Bound value type |
method IEnumerable<T> SkipLast <T> (this IEnumerable<T> self, int n) Source #
Take all but the last n items in an enumerable
type | T | Bound value type |
method Option<A> ToOption <A> (this IEnumerable<A> self) Source #
Convert the enumerable to an Option.
type | A | Bound value type |
param | self | This |
returns | If enumerable is empty then return None, else Some(head) |
method TryOption<A> ToTryOption <A> (this IEnumerable<A> self) Source #
Convert the enumerable to an Option.
type | A | Bound value type |
param | self | This |
returns | If enumerable is empty then return None, else Some(head) |
method TAccumulate Aggregate <TSource, TAccumulate> (this Lst<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func) Source #
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.
method TResult Aggregate <TSource, TAccumulate, TResult> (this Lst<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, Func<TAccumulate, TResult> resultSelector) Source #
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.
method TSource Aggregate <TSource> (this Lst<TSource> source, Func<TSource, TSource, TSource> func) Source #
Applies an accumulator function over a sequence.
method bool All <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Determines whether all elements of a sequence satisfy a condition.
method bool Any <TSource> (this Lst<TSource> source) Source #
Determines whether a sequence contains any elements.
method bool Any <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Determines whether any element of a sequence satisfies a condition.
method IEnumerable<TSource> AsEnumerable <TSource> (this Lst<TSource> source) Source #
Returns the input typed as IEnumerable
method IQueryable<TElement> AsQueryable <TElement> (this Lst<TElement> source) Source #
Converts a generic IEnumerable
method decimal Average (this Lst<decimal> source) Source #
Computes the average of a sequence of Decimal values.
method decimal Average <TSource> (this Lst<TSource> source, Func<TSource, decimal> selector) Source #
Computes the average of a sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence.
method decimal? Average (this Lst<decimal?> source) Source #
Computes the average of a sequence of nullable Decimal values.
method decimal? Average <TSource> (this Lst<TSource> source, Func<TSource, decimal?> selector) Source #
Computes the average of a sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence.
method double Average (this Lst<double> source) Source #
Computes the average of a sequence of Double values.
method double Average (this Lst<int> source) Source #
Computes the average of a sequence of Int32 values.
method double Average (this Lst<long> source) Source #
Computes the average of a sequence of Int64 values.
method double Average <TSource> (this Lst<TSource> source, Func<TSource, double> selector) Source #
Computes the average of a sequence of Double values that are obtained by invoking a transform function on each element of the input sequence.
method double Average <TSource> (this Lst<TSource> source, Func<TSource, int> selector) Source #
Computes the average of a sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence.
method double Average <TSource> (this Lst<TSource> source, Func<TSource, long> selector) Source #
Computes the average of a sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence.
method double? Average (this Lst<double?> source) Source #
Computes the average of a sequence of nullable Double values.
method double? Average (this Lst<int?> source) Source #
Computes the average of a sequence of nullable Int32 values.
method double? Average (this Lst<long?> source) Source #
Computes the average of a sequence of nullable Int64 values.
method double? Average <TSource> (this Lst<TSource> source, Func<TSource, double?> selector) Source #
Computes the average of a sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence.
method double? Average <TSource> (this Lst<TSource> source, Func<TSource, int?> selector) Source #
Computes the average of a sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence.
method double? Average <TSource> (this Lst<TSource> source, Func<TSource, long?> selector) Source #
Computes the average of a sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence.
method float Average (this Lst<float> source) Source #
Computes the average of a sequence of Single values.
method float Average <TSource> (this Lst<TSource> source, Func<TSource, float> selector) Source #
Computes the average of a sequence of Single values that are obtained by invoking a transform function on each element of the input sequence.
method float? Average (this Lst<float?> source) Source #
Computes the average of a sequence of nullable Single values.
method float? Average <TSource> (this Lst<TSource> source, Func<TSource, float?> selector) Source #
Computes the average of a sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence.
method IEnumerable<TSource> Concat <TSource> (this Lst<TSource> first, IEnumerable<TSource> second) Source #
Concatenates two sequences.
method bool Contains <TSource> (this Lst<TSource> source, TSource value) Source #
Determines whether a sequence contains a specified element by using the default equality comparer.
method bool Contains <TSource> (this Lst<TSource> source, TSource value, IEqualityComparer<TSource> comparer) Source #
Determines whether a sequence contains a specified element by using a specified IEqualityComparer
method int Count <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Returns a number that represents how many elements in the specified sequence satisfy a condition.
method IEnumerable<TSource> DefaultIfEmpty <TSource> (this Lst<TSource> source) Source #
Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.
method IEnumerable<TSource> DefaultIfEmpty <TSource> (this Lst<TSource> source, TSource defaultValue) Source #
Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.
method IEnumerable<TSource> Distinct <TSource> (this Lst<TSource> source) Source #
Returns distinct elements from a sequence by using the default equality comparer to compare values.
method IEnumerable<TSource> Distinct <TSource> (this Lst<TSource> source, IEqualityComparer<TSource> comparer) Source #
Returns distinct elements from a sequence by using a specified IEqualityComparer
method TSource ElementAt <TSource> (this Lst<TSource> source, int index) Source #
Returns the element at a specified index in a sequence.
method TSource ElementAtOrDefault <TSource> (this Lst<TSource> source, int index) Source #
Returns the element at a specified index in a sequence or a default value if the index is out of range.
method IEnumerable<TSource> Except <TSource> (this Lst<TSource> first, IEnumerable<TSource> second) Source #
Produces the set difference of two sequences by using the default equality comparer to compare values.
method IEnumerable<TSource> Except <TSource> (this Lst<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer) Source #
Produces the set difference of two sequences by using the specified IEqualityComparer
method TSource First <TSource> (this Lst<TSource> source) Source #
Returns the first element of a sequence.
method TSource First <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Returns the first element in a sequence that satisfies a specified condition.
method TSource FirstOrDefault <TSource> (this Lst<TSource> source) Source #
Returns the first element of a sequence, or a default value if the sequence contains no elements.
method TSource FirstOrDefault <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
method IEnumerable<IGrouping<TKey, TElement>> GroupBy <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) Source #
Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.
method IEnumerable<IGrouping<TKey, TElement>> GroupBy <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer) Source #
Groups the elements of a sequence according to a key selector function. The keys are compared by using a comparer and each group's elements are projected by using a specified function.
method IEnumerable<IGrouping<TKey, TSource>> GroupBy <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector) Source #
Groups the elements of a sequence according to a specified key selector function.
method IEnumerable<IGrouping<TKey, TSource>> GroupBy <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer) Source #
Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.
method IEnumerable<TResult> GroupBy <TSource, TKey, TElement, TResult> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector) Source #
Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The elements of each group are projected by using a specified function.
method IEnumerable<TResult> GroupBy <TSource, TKey, TElement, TResult> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey> comparer) Source #
Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Key values are compared by using a specified comparer, and the elements of each group are projected by using a specified function.
method IEnumerable<TResult> GroupBy <TSource, TKey, TResult> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector) Source #
Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.
method IEnumerable<TResult> GroupBy <TSource, TKey, TResult> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey> comparer) Source #
Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The keys are compared by using a specified comparer.
method IEnumerable<TResult> GroupJoin <TOuter, TInner, TKey, TResult> (this Lst<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector) Source #
Correlates the elements of two sequences based on equality of keys and groups the results. The default equality comparer is used to compare keys.
method IEnumerable<TResult> GroupJoin <TOuter, TInner, TKey, TResult> (this Lst<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey> comparer) Source #
Correlates the elements of two sequences based on key equality and groups the results. A specified IEqualityComparer
method IEnumerable<TSource> Intersect <TSource> (this Lst<TSource> first, IEnumerable<TSource> second) Source #
Produces the set intersection of two sequences by using the default equality comparer to compare values.
method IEnumerable<TSource> Intersect <TSource> (this Lst<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer) Source #
Produces the set intersection of two sequences by using the specified IEqualityComparer
method IEnumerable<TResult> Join <TOuter, TInner, TKey, TResult> (this Lst<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector) Source #
Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys.
method IEnumerable<TResult> Join <TOuter, TInner, TKey, TResult> (this Lst<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey> comparer) Source #
Correlates the elements of two sequences based on matching keys. A specified IEqualityComparer
method TSource Last <TSource> (this Lst<TSource> source) Source #
Returns the last element of a sequence.
method TSource Last <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Returns the last element of a sequence that satisfies a specified condition.
method TSource LastOrDefault <TSource> (this Lst<TSource> source) Source #
Returns the last element of a sequence, or a default value if the sequence contains no elements.
method TSource LastOrDefault <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.
method long LongCount <TSource> (this Lst<TSource> source) Source #
Returns an Int64 that represents the total number of elements in a sequence.
method long LongCount <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Returns an Int64 that represents how many elements in a sequence satisfy a condition.
method decimal Max (this Lst<decimal> source) Source #
Returns the maximum value in a sequence of Decimal values.
method decimal Max <TSource> (this Lst<TSource> source, Func<TSource, decimal> selector) Source #
Invokes a transform function on each element of a sequence and returns the maximum Decimal value.
method decimal? Max (this Lst<decimal?> source) Source #
Returns the maximum value in a sequence of nullable Decimal values.
method decimal? Max <TSource> (this Lst<TSource> source, Func<TSource, decimal?> selector) Source #
Invokes a transform function on each element of a sequence and returns the maximum nullable Decimal value.
method double Max (this Lst<double> source) Source #
Returns the maximum value in a sequence of Double values.
method double Max <TSource> (this Lst<TSource> source, Func<TSource, double> selector) Source #
Invokes a transform function on each element of a sequence and returns the maximum Double value.
method double? Max (this Lst<double?> source) Source #
Returns the maximum value in a sequence of nullable Double values.
method double? Max <TSource> (this Lst<TSource> source, Func<TSource, double?> selector) Source #
Invokes a transform function on each element of a sequence and returns the maximum nullable Double value.
method float Max (this Lst<float> source) Source #
Returns the maximum value in a sequence of Single values.
method float Max <TSource> (this Lst<TSource> source, Func<TSource, float> selector) Source #
Invokes a transform function on each element of a sequence and returns the maximum Single value.
method float? Max (this Lst<float?> source) Source #
Returns the maximum value in a sequence of nullable Single values.
method float? Max <TSource> (this Lst<TSource> source, Func<TSource, float?> selector) Source #
Invokes a transform function on each element of a sequence and returns the maximum nullable Single value.
method int Max (this Lst<int> source) Source #
Returns the maximum value in a sequence of Int32 values.
method int Max <TSource> (this Lst<TSource> source, Func<TSource, int> selector) Source #
Invokes a transform function on each element of a sequence and returns the maximum Int32 value.
method int? Max (this Lst<int?> source) Source #
Returns the maximum value in a sequence of nullable Int32 values.
method int? Max <TSource> (this Lst<TSource> source, Func<TSource, int?> selector) Source #
Invokes a transform function on each element of a sequence and returns the maximum nullable Int32 value.
method long Max (this Lst<long> source) Source #
Returns the maximum value in a sequence of Int64 values.
method long Max <TSource> (this Lst<TSource> source, Func<TSource, long> selector) Source #
Invokes a transform function on each element of a sequence and returns the maximum Int64 value.
method long? Max (this Lst<long?> source) Source #
Returns the maximum value in a sequence of nullable Int64 values.
method long? Max <TSource> (this Lst<TSource> source, Func<TSource, long?> selector) Source #
Invokes a transform function on each element of a sequence and returns the maximum nullable Int64 value.
method TResult Max <TSource, TResult> (this Lst<TSource> source, Func<TSource, TResult> selector) Source #
Invokes a transform function on each element of a generic sequence and returns the maximum resulting value.
method TSource Max <TSource> (this Lst<TSource> source) Source #
Returns the maximum value in a generic sequence.
method decimal Min (this Lst<decimal> source) Source #
Returns the minimum value in a sequence of Decimal values.
method decimal Min <TSource> (this Lst<TSource> source, Func<TSource, decimal> selector) Source #
Invokes a transform function on each element of a sequence and returns the minimum Decimal value.
method decimal? Min (this Lst<decimal?> source) Source #
Returns the minimum value in a sequence of nullable Decimal values.
method decimal? Min <TSource> (this Lst<TSource> source, Func<TSource, decimal?> selector) Source #
Invokes a transform function on each element of a sequence and returns the minimum nullable Decimal value.
method double Min (this Lst<double> source) Source #
Returns the minimum value in a sequence of Double values.
method double Min <TSource> (this Lst<TSource> source, Func<TSource, double> selector) Source #
Invokes a transform function on each element of a sequence and returns the minimum Double value.
method double? Min (this Lst<double?> source) Source #
Returns the minimum value in a sequence of nullable Double values.
method double? Min <TSource> (this Lst<TSource> source, Func<TSource, double?> selector) Source #
Invokes a transform function on each element of a sequence and returns the minimum nullable Double value.
method float Min (this Lst<float> source) Source #
Returns the minimum value in a sequence of Single values.
method float Min <TSource> (this Lst<TSource> source, Func<TSource, float> selector) Source #
Invokes a transform function on each element of a sequence and returns the minimum Single value.
method float? Min (this Lst<float?> source) Source #
Returns the minimum value in a sequence of nullable Single values.
method float? Min <TSource> (this Lst<TSource> source, Func<TSource, float?> selector) Source #
Invokes a transform function on each element of a sequence and returns the minimum nullable Single value.
method int Min (this Lst<int> source) Source #
Returns the minimum value in a sequence of Int32 values.
method int Min <TSource> (this Lst<TSource> source, Func<TSource, int> selector) Source #
Invokes a transform function on each element of a sequence and returns the minimum Int32 value.
method int? Min (this Lst<int?> source) Source #
Returns the minimum value in a sequence of nullable Int32 values.
method int? Min <TSource> (this Lst<TSource> source, Func<TSource, int?> selector) Source #
Invokes a transform function on each element of a sequence and returns the minimum nullable Int32 value.
method long Min (this Lst<long> source) Source #
Returns the minimum value in a sequence of Int64 values.
method long Min <TSource> (this Lst<TSource> source, Func<TSource, long> selector) Source #
Invokes a transform function on each element of a sequence and returns the minimum Int64 value.
method long? Min (this Lst<long?> source) Source #
Returns the minimum value in a sequence of nullable Int64 values.
method long? Min <TSource> (this Lst<TSource> source, Func<TSource, long?> selector) Source #
Invokes a transform function on each element of a sequence and returns the minimum nullable Int64 value.
method TResult Min <TSource, TResult> (this Lst<TSource> source, Func<TSource, TResult> selector) Source #
Invokes a transform function on each element of a generic sequence and returns the minimum resulting value.
method TSource Min <TSource> (this Lst<TSource> source) Source #
Returns the minimum value in a generic sequence.
method IOrderedEnumerable<TSource> OrderBy <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector) Source #
Sorts the elements of a sequence in ascending order according to a key.
method IOrderedEnumerable<TSource> OrderBy <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer) Source #
Sorts the elements of a sequence in ascending order by using a specified comparer.
method IOrderedEnumerable<TSource> OrderByDescending <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector) Source #
Sorts the elements of a sequence in descending order according to a key.
method IOrderedEnumerable<TSource> OrderByDescending <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer) Source #
Sorts the elements of a sequence in descending order by using a specified comparer.
method IEnumerable<TSource> Reverse <TSource> (this Lst<TSource> source) Source #
Inverts the order of the elements in a sequence.
method bool SequenceEqual <TSource> (this Lst<TSource> first, IEnumerable<TSource> second) Source #
Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type.
method bool SequenceEqual <TSource> (this Lst<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer) Source #
Determines whether two sequences are equal by comparing their elements by using a specified IEqualityComparer
method TSource Single <TSource> (this Lst<TSource> source) Source #
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.
method TSource Single <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.
method TSource SingleOrDefault <TSource> (this Lst<TSource> source) Source #
Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.
method TSource SingleOrDefault <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
method IEnumerable<TSource> Skip <TSource> (this Lst<TSource> source, int count) Source #
Bypasses a specified number of elements in a sequence and then returns the remaining elements.
method IEnumerable<TSource> SkipWhile <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.
method IEnumerable<TSource> SkipWhile <TSource> (this Lst<TSource> source, Func<TSource, int, bool> predicate) Source #
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function.
method decimal Sum (this Lst<decimal> source) Source #
Computes the sum of a sequence of Decimal values.
method decimal Sum <TSource> (this Lst<TSource> source, Func<TSource, decimal> selector) Source #
Computes the sum of the sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence.
method decimal? Sum (this Lst<decimal?> source) Source #
Computes the sum of a sequence of nullable Decimal values.
method decimal? Sum <TSource> (this Lst<TSource> source, Func<TSource, decimal?> selector) Source #
Computes the sum of the sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence.
method double Sum (this Lst<double> source) Source #
Computes the sum of a sequence of Double values.
method double Sum <TSource> (this Lst<TSource> source, Func<TSource, double> selector) Source #
Computes the sum of the sequence of Double values that are obtained by invoking a transform function on each element of the input sequence.
method double? Sum (this Lst<double?> source) Source #
Computes the sum of a sequence of nullable Double values.
method double? Sum <TSource> (this Lst<TSource> source, Func<TSource, double?> selector) Source #
Computes the sum of the sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence.
method float Sum <TSource> (this Lst<TSource> source, Func<TSource, float> selector) Source #
Computes the sum of the sequence of Single values that are obtained by invoking a transform function on each element of the input sequence.
method float? Sum (this Lst<float?> source) Source #
Computes the sum of a sequence of nullable Single values.
method float? Sum <TSource> (this Lst<TSource> source, Func<TSource, float?> selector) Source #
Computes the sum of the sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence.
method int Sum <TSource> (this Lst<TSource> source, Func<TSource, int> selector) Source #
Computes the sum of the sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence.
method int? Sum (this Lst<int?> source) Source #
Computes the sum of a sequence of nullable Int32 values.
method int? Sum <TSource> (this Lst<TSource> source, Func<TSource, int?> selector) Source #
Computes the sum of the sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence.
method long Sum <TSource> (this Lst<TSource> source, Func<TSource, long> selector) Source #
Computes the sum of the sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence.
method long? Sum (this Lst<long?> source) Source #
Computes the sum of a sequence of nullable Int64 values.
method long? Sum <TSource> (this Lst<TSource> source, Func<TSource, long?> selector) Source #
Computes the sum of the sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence.
method IEnumerable<TSource> Take <TSource> (this Lst<TSource> source, int count) Source #
Returns a specified number of contiguous elements from the start of a sequence.
method IEnumerable<TSource> TakeWhile <TSource> (this Lst<TSource> source, Func<TSource, bool> predicate) Source #
Returns elements from a sequence as long as a specified condition is true.
method IEnumerable<TSource> TakeWhile <TSource> (this Lst<TSource> source, Func<TSource, int, bool> predicate) Source #
Returns elements from a sequence as long as a specified condition is true. The element's index is used in the logic of the predicate function.
method TSource[] ToArray <TSource> (this Lst<TSource> source) Source #
Creates an array from a IEnumerable
method Dictionary<TKey, TElement> ToDictionary <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) Source #
Creates a Dictionary<TKey,TValue> from an IEnumerable
method Dictionary<TKey, TElement> ToDictionary <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer) Source #
Creates a Dictionary<TKey,TValue> from an IEnumerable
method Dictionary<TKey, TSource> ToDictionary <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector) Source #
Creates a Dictionary<TKey,TValue> from an IEnumerable
method Dictionary<TKey, TSource> ToDictionary <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer) Source #
Creates a Dictionary<TKey,TValue> from an IEnumerable
method List<TSource> ToList <TSource> (this Lst<TSource> source) Source #
Creates a List
method ILookup<TKey, TElement> ToLookup <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) Source #
Creates a Lookup<TKey,TElement> from an IEnumerable
method ILookup<TKey, TElement> ToLookup <TSource, TKey, TElement> (this Lst<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer) Source #
Creates a Lookup<TKey,TElement> from an IEnumerable
method ILookup<TKey, TSource> ToLookup <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector) Source #
Creates a Lookup<TKey,TElement> from an IEnumerable
method ILookup<TKey, TSource> ToLookup <TSource, TKey> (this Lst<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer) Source #
Creates a Lookup<TKey,TElement> from an IEnumerable
method IEnumerable<TSource> Union <TSource> (this Lst<TSource> first, IEnumerable<TSource> second) Source #
Produces the set union of two sequences by using the default equality comparer.
struct ListEnumerator <T> Source #
method Lst<T> create <T> (params T[] items) Source #
Create a list from a initial set of items
param | items | Items |
returns | Lst T |
method Lst<T> createRange <T> (IEnumerable<T> items) Source #
Create a list from an initial set of items
param | items | Items |
returns | Lst T |
method IEnumerable<T> generate <T> (int count, Func<int, T> generator) Source #
Generates a sequence of T using the provided delegate to initialise each item.
method IEnumerable<T> generate <T> (Func<int, T> generator) Source #
Generates an int.MaxValue sequence of T using the provided delegate to initialise each item.
method IEnumerable<T> repeat <T> (T item, int count) Source #
Generates a sequence that contains one repeated value.
method Lst<T> add <T> (Lst<T> list, T value) Source #
Add an item to the list
param | list | List |
param | value | Item to add |
returns | A new Lst T |
method Lst<T> addRange <T> (Lst<T> list, IEnumerable<T> value) Source #
Add a range of items to the list
param | list | List |
param | value | Items to add |
returns | A new Lst T |
method Lst<T> remove <T> (Lst<T> list, T value) Source #
Remove an item from the list
param | list | List |
param | value | value to remove |
returns | A new Lst T |
method Lst<T> removeAt <T> (Lst<T> list, int index) Source #
Remove an item at a specified index in the list
param | list | List |
param | index | Index of item to remove |
returns | A new Lst T |
method T head <T> (IEnumerable<T> list) Source #
Get the item at the head (first) of the list
param | list | List |
returns | Head item |
method Option<A> headOrNone <A> (IEnumerable<A> list) Source #
Get the item at the head (first) of the list or None if the list is empty
param | list | List |
returns | Optional head item |
method Either<L, R> headOrLeft <L, R> (IEnumerable<R> list, L left) Source #
Get the item at the head (first) of the list or Left if the list is empty
param | list | List |
returns | Either head item or left |
method Validation<Fail, Success> headOrInvalid <Fail, Success> (IEnumerable<Success> list, Fail fail) Source #
Get the item at the head (first) of the list or fail if the list is empty
param | list | List |
returns | Either head item or fail |
method Validation<Fail, Success> headOrInvalid <Fail, Success> (IEnumerable<Success> list, Seq<Fail> fail) Source #
Get the item at the head (first) of the list or fail if the list is empty
param | list | List |
returns | Either head item or fail |
method Validation<MonoidFail, Fail, Success> headOrInvalid <MonoidFail, Fail, Success> (IEnumerable<Success> list, Fail fail) Source #
Get the item at the head (first) of the list or fail if the list is empty
param | list | List |
returns | Either head item or fail |
method A last <A> (IEnumerable<A> list) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Option<A> lastOrNone <A> (IEnumerable<A> list) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Either<L, R> lastOrLeft <L, R> (IEnumerable<R> list, L left) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Validation<Fail, Success> lastOrInvalid <Fail, Success> (IEnumerable<Success> list, Fail fail) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Validation<Fail, Success> lastOrInvalid <Fail, Success> (IEnumerable<Success> list, Seq<Fail> fail) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Validation<MonoidFail, Fail, Success> lastOrInvalid <MonoidFail, Fail, Success> (IEnumerable<Success> list, Fail fail) Source #
Get the last item of the list
param | list | List |
returns | Last item |
method Seq<A> init <A> (IEnumerable<A> list) Source #
Get all items in the list except the last one
Must evaluate the last item to know it's the last, but won't return it
param | list | List |
returns | The initial items (all but the last) |
method IEnumerable<T> tail <T> (IEnumerable<T> list) Source #
Get the tail of the list (skips the head item)
param | list | List |
returns | Enumerable of T |
method IEnumerable<R> map <T, R> (IEnumerable<T> list, Func<T, R> map) Source #
Projects the values in the enumerable using a map function into a new enumerable (Select in LINQ).
type | T | Enumerable item type |
type | R | Return enumerable item type |
param | list | Enumerable to map |
param | map | Map function |
returns | Mapped enumerable |
method IEnumerable<Func<T2, R>> parmap <T1, T2, R> (IEnumerable<T1> list, Func<T1, T2, R> func) Source #
Partial application map
method IEnumerable<Func<T2, Func<T3, R>>> parmap <T1, T2, T3, R> (IEnumerable<T1> list, Func<T1, T2, T3, R> func) Source #
Partial application map
method IEnumerable<R> map <T, R> (IEnumerable<T> list, Func<int, T, R> map) Source #
Projects the values in the enumerable into a new enumerable using a map function, which is also given an index value (Select in LINQ - note that the order of the arguments of the map function are the other way around, here the index is the first argument).
type | T | Enumerable item type |
type | R | Return enumerable item type |
param | list | Enumerable to map |
param | map | Map function |
returns | Mapped enumerable |
method IEnumerable<T> filter <T> (IEnumerable<T> list, Func<T, bool> predicate) Source #
Removes items from the list that do not match the given predicate (Where in LINQ)
type | T | Enumerable item type |
param | list | Enumerable to filter |
param | predicate | Predicate function |
returns | Filtered enumerable |
method IEnumerable<R> choose <T, R> (IEnumerable<T> list, Func<T, Option<R>> selector) Source #
Applies the given function 'selector' to each element of the list. Returns the list comprised of the results for each element where the function returns Some(f(x)).
type | T | Enumerable item type |
param | list | Enumerable |
param | selector | Selector function |
returns | Mapped and filtered enumerable |
method IEnumerable<R> choose <T, R> (IEnumerable<T> list, Func<int, T, Option<R>> selector) Source #
Applies the given function 'selector' to each element of the list. Returns the list comprised of the results for each element where the function returns Some(f(x)). An index value is passed through to the selector function also.
type | T | Enumerable item type |
param | list | Enumerable |
param | selector | Selector function |
returns | Mapped and filtered enumerable |
method IEnumerable<R> collect <T, R> (IEnumerable<T> list, Func<T, IEnumerable<R>> map) Source #
For each element of the list, applies the given function. Concatenates all the results and returns the combined list.
type | T | Enumerable item type |
type | R | Return enumerable item type |
param | list | Enumerable to map |
param | map | Map function |
returns | Mapped enumerable |
method int sum (IEnumerable<int> list) Source #
Returns the sum total of all the items in the list (Sum in LINQ)
param | list | List to sum |
returns | Sum total |
method float sum (IEnumerable<float> list) Source #
Returns the sum total of all the items in the list (Sum in LINQ)
param | list | List to sum |
returns | Sum total |
method double sum (IEnumerable<double> list) Source #
Returns the sum total of all the items in the list (Sum in LINQ)
param | list | List to sum |
returns | Sum total |
method decimal sum (IEnumerable<decimal> list) Source #
Returns the sum total of all the items in the list (Sum in LINQ)
param | list | List to sum |
returns | Sum total |
method IEnumerable<T> rev <T> (IEnumerable<T> list) Source #
Reverses the enumerable (Reverse in LINQ)
type | T | Enumerable item type |
param | list | Enumerable to reverse |
returns | Reversed enumerable |
method Lst<T> rev <T> (Lst<T> list) Source #
Reverses the list (Reverse in LINQ)
type | T | List item type |
param | list | List to reverse |
returns | Reversed list |
method Lst<PredList, T> rev <PredList, T> (Lst<PredList, T> list) Source #
Reverses the list (Reverse in LINQ)
type | T | List item type |
param | list | List to reverse |
returns | Reversed list |
method Lst<PredList, PredItem, T> rev <PredList, PredItem, T> (Lst<PredList, PredItem, T> list) Source #
Reverses the list (Reverse in LINQ)
type | T | List item type |
param | list | List to reverse |
returns | Reversed list |
method IEnumerable<T> append <T> (IEnumerable<T> lhs, IEnumerable<T> rhs) Source #
Concatenate two enumerables (Concat in LINQ)
type | T | Enumerable item type |
param | lhs | First enumerable |
param | rhs | Second enumerable |
returns | Concatenated enumerable |
method IEnumerable<T> append <T> (IEnumerable<T> x, IEnumerable<IEnumerable<T>> xs) Source #
Concatenate an enumerable and an enumerable of enumerables
type | T | List item type |
param | lhs | First list |
param | rhs | Second list |
returns | Concatenated list |
method IEnumerable<T> append <T> (params IEnumerable<T>[] lists) Source #
Concatenate N enumerables
type | T | Enumerable type |
param | lists | Enumerables to concatenate |
returns | A single enumerable with all of the items concatenated |
method S fold <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder) Source #
Applies a function 'folder' to each element of the collection, threading an accumulator argument through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result. (Aggregate in LINQ)
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Aggregate value |
method S foldBack <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder) Source #
Applies a function 'folder' to each element of the collection (from last element to first), threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Aggregate value |
method S foldWhile <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the collection whilst the predicate function returns True for the item being processed, threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S foldWhile <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the collection, threading an accumulator argument through the computation (and whilst the predicate function returns True when passed the aggregate state). The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method S foldBackWhile <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the collection (from last element to first) whilst the predicate function returns True for the item being processed, threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S foldBackWhile <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the collection (from last element to first), threading an accumulator argument through the computation (and whilst the predicate function returns True when passed the aggregate state). The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method S foldUntil <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the collection whilst the predicate function returns False for the item being processed, threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S foldUntil <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the collection, threading an accumulator argument through the computation (and whilst the predicate function returns False when passed the aggregate state). The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method S foldBackUntil <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the collection (from last element to first) whilst the predicate function returns False for the item being processed, threading an aggregate state through the computation. The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S foldBackUntil <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the collection (from last element to first), threading an accumulator argument through the computation (and whilst the predicate function returns False when passed the aggregate state). The fold function takes the state argument, and applies the function 'folder' to it and the first element of the list. Then, it feeds this result into the function 'folder' along with the second element, and so on. It returns the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method A reduce <A> (IEnumerable<A> list, Func<A, A, A> reducer) Source #
Applies a function to each element of the collection (from first element to last), threading an accumulator argument through the computation. This function first applies the function to the first two elements of the list. Then, it passes this result into the function along with the third element and so on. Finally, it returns the final result.
The enumerable must contain at least one item or an excpetion will be thrown
type | A | Bound item type |
param | list | Enumerable to reduce |
param | reducer | Reduce function |
returns | Aggregate value |
method Option<A> reduceOrNone <A> (IEnumerable<A> list, Func<A, A, A> reducer) Source #
Applies a function to each element of the collection (from first element to last), threading an accumulator argument through the computation. This function first applies the function to the first two elements of the list. Then, it passes this result into the function along with the third element and so on. Finally, it returns the final result.
The enumerable must contain at least one item or None will be returned
type | A | Bound item type |
param | list | Enumerable to reduce |
param | reducer | Reduce function |
returns | Optional aggregate value |
method A reduceBack <A> (IEnumerable<A> list, Func<A, A, A> reducer) Source #
Applies a function to each element of the collection, threading an accumulator argument through the computation. This function first applies the function to the first two elements of the list. Then, it passes this result into the function along with the third element and so on. Finally, it returns the final result.
The enumerable must contain at least one item or an excpetion will be thrown
type | A | Bound item type |
param | list | Enumerable to reduce |
param | reducer | Reduce function |
returns | Aggregate value |
method Option<A> reduceBackOrNone <A> (IEnumerable<A> list, Func<A, A, A> reducer) Source #
Applies a function to each element of the collection, threading an accumulator argument through the computation. This function first applies the function to the first two elements of the list. Then, it passes this result into the function along with the third element and so on. Finally, it returns the final result.
The enumerable must contain at least one item or None will be returned
type | A | Bound item type |
param | list | Enumerable to reduce |
param | reducer | Reduce function |
returns | Optional aggregate value |
method IEnumerable<S> scan <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder) Source #
Applies a function to each element of the collection, threading an accumulator argument through the computation. This function takes the state argument, and applies the function to it and the first element of the list. Then, it passes this result into the function along with the second element, and so on. Finally, it returns the list of intermediate results and the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Folding function |
returns | Aggregate state |
method IEnumerable<S> scanBack <S, T> (IEnumerable<T> list, S state, Func<S, T, S> folder) Source #
Applies a function to each element of the collection (from last element to first), threading an accumulator argument through the computation. This function takes the state argument, and applies the function to it and the first element of the list. Then, it passes this result into the function along with the second element, and so on. Finally, it returns the list of intermediate results and the final result.
type | S | State type |
type | T | Enumerable item type |
param | list | Enumerable to fold |
param | state | Initial state |
param | folder | Folding function |
returns | Aggregate state |
method Option<T> find <T> (IEnumerable<T> list, Func<T, bool> pred) Source #
Returns Some(x) for the first item in the list that matches the predicate provided, None otherwise.
type | T | Enumerable item type |
param | list | Enumerable to search |
param | pred | Predicate |
returns | Some(x) for the first item in the list that matches the predicate provided, None otherwise. |
method IEnumerable<T> findSeq <T> (IEnumerable<T> list, Func<T, bool> pred) Source #
Returns [x] for the first item in the list that matches the predicate provided, [] otherwise.
type | T | Enumerable item type |
param | list | Enumerable to search |
param | pred | Predicate |
returns | [x] for the first item in the list that matches the predicate provided, [] otherwise. |
method Lst<T> freeze <T> (IEnumerable<T> list) Source #
Convert any enumerable into an immutable Lst T
type | T | Enumerable item type |
param | list | Enumerable to convert |
returns | Lst of T |
method Lst<PredList, T> freeze <PredList, T> (IEnumerable<T> list) Source #
Convert any enumerable into an immutable Lst T
type | T | Enumerable item type |
param | list | Enumerable to convert |
returns | Lst of T |
method Lst<PredList, PredItem, T> freeze <PredList, PredItem, T> (IEnumerable<T> list) Source #
Convert any enumerable into an immutable Lst T
type | T | Enumerable item type |
param | list | Enumerable to convert |
returns | Lst of T |
method IEnumerable<V> zip <T, U, V> (IEnumerable<T> list, IEnumerable<U> other, Func<T, U, V> zipper) Source #
Joins two enumerables together either into a single enumerable using the join function provided
param | list | First list to join |
param | other | Second list to join |
param | zipper | Join function |
returns | Joined enumerable |
method IEnumerable<(T Left, U Right)> zip <T, U> (IEnumerable<T> list, IEnumerable<U> other) Source #
Joins two enumerables together either into an enumerables of tuples
param | list | First list to join |
param | other | Second list to join |
param | zipper | Join function |
returns | Joined enumerable of tuples |
method int length <T> (IEnumerable<T> list) Source #
Returns the number of items in the enumerable
type | T | Enumerable item type |
param | list | Enumerable to count |
returns | The number of items in the enumerable |
method Unit iter <T> (IEnumerable<T> list, Action<T> action) Source #
Invokes an action for each item in the enumerable in order
type | T | Enumerable item type |
param | list | Enumerable to iterate |
param | action | Action to invoke with each item |
returns | Unit |
method Unit iter <T> (IEnumerable<T> list, Action<int, T> action) Source #
Invokes an action for each item in the enumerable in order and supplies a running index value.
type | T | Enumerable item type |
param | list | Enumerable to iterate |
param | action | Action to invoke with each item |
returns | Unit |
method Unit consume <T> (IEnumerable<T> list) Source #
Iterate each item in the enumerable in order (consume items)
type | T | Enumerable item type |
param | list | Enumerable to consume |
returns | Unit |
method bool forall <T> (IEnumerable<T> list, Func<T, bool> pred) Source #
Returns true if all items in the enumerable match a predicate (Any in LINQ)
type | T | Enumerable item type |
param | list | Enumerable to test |
param | pred | Predicate |
returns | True if all items in the enumerable match the predicate |
method IEnumerable<T> distinct <T> (IEnumerable<T> list) Source #
Return a new enumerable with all duplicate values removed
type | T | Enumerable item type |
param | list | Enumerable |
returns | A new enumerable with all duplicate values removed |
method IEnumerable<T> distinct <EQ, T> (IEnumerable<T> list) Source #
Return a new enumerable with all duplicate values removed
type | T | Enumerable item type |
param | list | Enumerable |
returns | A new enumerable with all duplicate values removed |
method IEnumerable<T> distinct <T, K> (IEnumerable<T> list, Func<T, K> keySelector, Option<Func<K, K, bool>> compare = default(Option<Func<K, K, bool>>)) Source #
Return a new enumerable with all duplicate values removed
type | T | Enumerable item type |
param | list | Enumerable |
returns | A new enumerable with all duplicate values removed |
method IEnumerable<T> take <T> (IEnumerable<T> list, int count) Source #
Returns a new enumerable with the first 'count' items from the enumerable provided
type | T | Enumerable item type |
param | list | Enumerable |
param | count | Number of items to take |
returns | A new enumerable with the first 'count' items from the enumerable provided |
method IEnumerable<T> takeWhile <T> (IEnumerable<T> list, Func<T, bool> pred) Source #
Iterate the list, yielding items if they match the predicate provided, and stopping as soon as one doesn't
type | T | Enumerable item type |
param | list | Enumerable |
param | count | Number of items to take |
returns | A new enumerable with the first items that match the predicate |
method IEnumerable<T> takeWhile <T> (IEnumerable<T> list, Func<T, int, bool> pred) Source #
Iterate the list, yielding items if they match the predicate provided, and stopping as soon as one doesn't. An index value is also provided to the predicate function.
type | T | Enumerable item type |
param | list | Enumerable |
param | count | Number of items to take |
returns | A new enumerable with the first items that match the predicate |
method IEnumerable<S> unfold <S> (S state, Func<S, Option<S>> unfolder) Source #
Generate a new list from an intial state value and an 'unfolding' function. The unfold function generates the items in the resulting list until None is returned.
type | S | State type |
param | state | Initial state |
param | unfolder | Unfold function |
returns | Unfolded enumerable |
method IEnumerable<A> unfold <S, A> (S state, Func<S, Option<(A, S)>> unfolder) Source #
Generate a new list from an intial state value and an 'unfolding' function. An aggregate state value is threaded through separately to the yielded value. The unfold function generates the items in the resulting list until None is returned.
type | A | Bound value of resulting enumerable |
type | S | State type |
param | state | Initial state |
param | unfolder | Unfold function |
returns | Unfolded enumerable |
method IEnumerable<A> unfold <S1, S2, A> ((S1, S2) state, Func<S1, S2, Option<(A, S1, S2)>> unfolder) Source #
Generate a new list from an intial state value and an 'unfolding' function. An aggregate state value is threaded through separately to the yielded value. The unfold function generates the items in the resulting list until None is returned.
type | A | Bound value of resulting enumerable |
type | S1 | State type |
type | S2 | State type |
param | state | Initial state |
param | unfolder | Unfold function |
returns | Unfolded enumerable |
method IEnumerable<A> unfold <S1, S2, S3, A> ((S1, S2, S3) state, Func<S1, S2, S3, Option<(A, S1, S2, S3)>> unfolder) Source #
Generate a new list from an intial state value and an 'unfolding' function. An aggregate state value is threaded through separately to the yielded value. The unfold function generates the items in the resulting list until None is returned.
type | A | Bound value of resulting enumerable |
type | S1 | State type |
type | S2 | State type |
type | S3 | State type |
param | state | Initial state |
param | unfolder | Unfold function |
returns | Unfolded enumerable |
method IEnumerable<A> unfold <S1, S2, S3, S4, A> ((S1, S2, S3, S4) state, Func<S1, S2, S3, S4, Option<(A, S1, S2, S3, S4)>> unfolder) Source #
Generate a new list from an intial state value and an 'unfolding' function. An aggregate state value is threaded through separately to the yielded value. The unfold function generates the items in the resulting list until None is returned.
type | A | Bound value of resulting enumerable |
type | S1 | State type |
type | S2 | State type |
type | S3 | State type |
type | S4 | State type |
param | state | Initial state |
param | unfolder | Unfold function |
returns | Unfolded enumerable |
method bool exists <T> (IEnumerable<T> list, Func<T, bool> pred) Source #
Returns true if any item in the enumerable matches the predicate provided
type | T | Enumerable item type |
param | list | Enumerable to test |
param | pred | Predicate |
returns | True if any item in the enumerable matches the predicate provided |
method IEnumerable<B> apply <A, B> (IEnumerable<Func<A, B>> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions
param | fabc | IEnumerable of functions |
param | fa | IEnumerable of argument values |
returns | Returns the result of applying the IEnumerable argument values to the IEnumerable functions |
method IEnumerable<B> apply <A, B> (Func<A, B> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions
param | fabc | IEnumerable of functions |
param | fa | IEnumerable of argument values |
returns | Returns the result of applying the IEnumerable argument values to the IEnumerable functions |
method IEnumerable<Func<B, C>> apply <A, B, C> (IEnumerable<Func<A, B, C>> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
returns | Returns the result of applying the IEnumerable of argument values to the IEnumerable of functions: an IEnumerable of functions of arity 1 |
method IEnumerable<Func<B, C>> apply <A, B, C> (Func<A, B, C> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
returns | Returns the result of applying the IEnumerable of argument values to the IEnumerable of functions: an IEnumerable of functions of arity 1 |
method IEnumerable<C> apply <A, B, C> ( IEnumerable<Func<A, B, C>> fabc, IEnumerable<A> fa, IEnumerable<B> fb) Source #
Apply IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
param | fb | IEnumerable argument values |
returns | Returns the result of applying the IEnumerables of arguments to the IEnumerable of functions |
method IEnumerable<C> apply <A, B, C> (Func<A, B, C> fabc, IEnumerable<A> fa, IEnumerable<B> fb) Source #
Apply IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
param | fb | IEnumerable argument values |
returns | Returns the result of applying the IEnumerables of arguments to the IEnumerable of functions |
method IEnumerable<Func<B, C>> apply <A, B, C> (IEnumerable<Func<A, Func<B, C>>> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
returns | Returns the result of applying the IEnumerable of argument values to the IEnumerable of functions: an IEnumerable of functions of arity 1 |
method IEnumerable<Func<B, C>> apply <A, B, C> (Func<A, Func<B, C>> fabc, IEnumerable<A> fa) Source #
Apply an IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
returns | Returns the result of applying the IEnumerable of argument values to the IEnumerable of functions: an IEnumerable of functions of arity 1 |
method IEnumerable<C> apply <A, B, C> (IEnumerable<Func<A, Func<B, C>>> fabc, IEnumerable<A> fa, IEnumerable<B> fb) Source #
Apply IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
param | fb | IEnumerable argument values |
returns | Returns the result of applying the IEnumerables of arguments to the IEnumerable of functions |
method IEnumerable<C> apply <A, B, C> (Func<A, Func<B, C>> fabc, IEnumerable<A> fa, IEnumerable<B> fb) Source #
Apply IEnumerable of values to an IEnumerable of functions of arity 2
param | fabc | IEnumerable of functions |
param | fa | IEnumerable argument values |
param | fb | IEnumerable argument values |
returns | Returns the result of applying the IEnumerables of arguments to the IEnumerable of functions |
method IEnumerable<B> action <A, B> (IEnumerable<A> fa, IEnumerable<B> fb) Source #
Evaluate fa, then fb, ignoring the result of fa
param | fa | Applicative to evaluate first |
param | fb | Applicative to evaluate second and then return |
returns | Applicative of type FB derived from Applicative of B |
method IEnumerable<IEnumerable<T>> tails <T> (IEnumerable<T> self) Source #
The tails function returns all final segments of the argument, longest first. For example, i.e. tails(['a','b','c']) == [['a','b','c'], ['b','c'], ['c'],[]]
type | T | List item type |
param | self | List |
returns | Enumerable of Enumerables of T |
method (IEnumerable<T>, IEnumerable<T>) span <T> (IEnumerable<T> self, Func<T, bool> pred) Source #
Span, applied to a predicate 'pred' and a list, returns a tuple where first element is longest prefix (possibly empty) of elements that satisfy 'pred' and second element is the remainder of the list:
type | T | List element type |
param | self | List |
param | pred | Predicate |
returns | Split list |
List.span(List(1,2,3,4,1,2,3,4), x => x < 3) == (List(1,2),List(3,4,1,2,3,4))
List.span(List(1,2,3), x => x < 9) == (List(1,2,3),List())
List.span(List(1,2,3), x => x < 0) == (List(),List(1,2,3))
Immutable list with validation predicate
type | PRED | Predicate instance to run when the type is constructed |
type | A | Value type |
Reference version for use in pattern-matching
Empty collection = null
Singleton collection = A
More = (A, Seq<A>) -- head and tail
var res = list.Case switch
{
A value => ...,
(var x, var xs) => ...,
_ => ...
}
method bool Contains (A value) Source #
Find if a value is in the collection
param | value | Value to test |
returns | True if collection contains value |
method bool Contains <EqA> (A value) Source #
Contains with provided Eq class instance
type | EqA | Eq class instance |
param | value | Value to test |
returns | True if collection contains value |
method Lst<PRED, A> AddRange (IEnumerable<A> items) Source #
Add a range of items to the end of the list
method IEnumerator<A> GetEnumerator () Source #
Get enumerator
method int IndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null) Source #
Find the index of an item
method Lst<PRED, A> InsertRange (int index, IEnumerable<A> items) Source #
Insert range of values at specified index
method int LastIndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null) Source #
Find the last index of an item in the list
method Lst<PRED, A> Remove (A value, IEqualityComparer<A> equalityComparer) Source #
Remove all items that match the value from the list
method Lst<PRED, A> RemoveRange (int index, int count) Source #
Remove a range of items
method IEnumerable<A> FindRange (int index, int count) Source #
Returns an enumerable range from the collection. This is the fastest way of iterating sub-ranges of the collection.
param | index | Index into the collection |
param | count | Number of items to find |
returns | IEnumerable of items |
method string ToString () Source #
Format the collection as [a, b, c, ...]
The elipsis is used for collections over 50 items
To get a formatted string with all the items, use ToFullString
or ToFullArrayString
.
method string ToFullString (string separator = ", ") Source #
Format the collection as a, b, c, ...
method string ToFullArrayString (string separator = ", ") Source #
Format the collection as [a, b, c, ...]
method IEnumerable<A> AsEnumerable () Source #
method int GetHashCode () Source #
Get the hash code Lazily (and once only) calculates the hash from the elements in the list Empty list hash == 0
class Lst <PredList, PredItem, A> Source #
Immutable list with validation predicate
type | PredItem | Predicate instance to run when the type is constructed |
type | A | Value type |
Reference version for use in pattern-matching
Empty collection = null
Singleton collection = A
More = (A, Seq<A>) -- head and tail
var res = list.Case switch
{
A value => ...,
(var x, var xs) => ...,
_ => ...
}
method bool Contains (A value) Source #
Find if a value is in the collection
param | value | Value to test |
returns | True if collection contains value |
method bool Contains <EqA> (A value) Source #
Contains with provided Eq class instance
type | EqA | Eq class instance |
param | value | Value to test |
returns | True if collection contains value |
method Lst<PredList, PredItem, A> AddRange (IEnumerable<A> items) Source #
Add a range of items to the end of the list
method IEnumerable<A> FindRange (int index, int count) Source #
Returns an enumerable range from the collection. This is the fastest way of iterating sub-ranges of the collection.
param | index | Index into the collection |
param | count | Number of items to find |
returns | IEnumerable of items |
method IEnumerator<A> GetEnumerator () Source #
Get enumerator
method string ToString () Source #
Format the collection as [a, b, c, ...]
The elipsis is used for collections over 50 items
To get a formatted string with all the items, use ToFullString
or ToFullArrayString
.
method string ToFullString (string separator = ", ") Source #
Format the collection as a, b, c, ...
method string ToFullArrayString (string separator = ", ") Source #
Format the collection as [a, b, c, ...]
method IEnumerable<A> AsEnumerable () Source #
method int IndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null) Source #
Find the index of an item
method Lst<PredList, PredItem, A> Insert (int index, A value) Source #
Insert value at specified index
method Lst<PredList, PredItem, A> InsertRange (int index, IEnumerable<A> items) Source #
Insert range of values at specified index
method int LastIndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null) Source #
Find the last index of an item in the list
method Lst<PredList, PredItem, A> Remove (A value) Source #
Remove all items that match the value from the list
method Lst<PredList, PredItem, A> Remove (A value, IEqualityComparer<A> equalityComparer) Source #
Remove all items that match the value from the list
method Lst<PredList, PredItem, A> RemoveAll (Func<A, bool> pred) Source #
Remove all items that match a predicate
method Lst<PredList, PredItem, A> RemoveAt (int index) Source #
Remove item at location
param | index | |
returns |
method Lst<PredList, PredItem, A> RemoveRange (int index, int count) Source #
Remove a range of items
method Lst<PredList, PredItem, A> SetItem (int index, A value) Source #
Set an item at the specified index
method Lst<PredList, PREDU, U> Map <PREDU, U> (Func<A, U> map) Source #
Map
method int GetHashCode () Source #
Get the hash code Lazily (and once only) calculates the hash from the elements in the list Empty list hash == 0