- ISeq <A>
- Seq <A>
- Empty = new Seq<A>(SeqEmptyInternal<A>.Default)
- Seq (IEnumerable<A> ma)
- Case
- Deconstruct (out A head, out Seq<A> tail)
- head
- headOrNone
- tail
- last
- lastOrNone
- map <B> (Lens<A, B> lens)
- this []
- At (int index)
- Add (A value)
- Concat (IEnumerable<A> items)
- Concat (Lst<A> items)
- Concat (Set<A> items)
- Concat (HashSet<A> items)
- Concat (Arr<A> items)
- Concat (Stck<A> items)
- Concat (IReadOnlyCollection<A> items)
- Concat (Seq<A> rhs)
- Head
- Tail
- Init
- HeadOrNone ()
- Last
- LastOrNone ()
- LastOrLeft <L> (L Left)
- LastOrLeft <L> (Func<L> Left)
- LastOrInvalid <F> (F Fail)
- LastOrInvalid <F> (Func<F> Fail)
- LastOrInvalid <MonoidFail, F> (F Fail)
- LastOrInvalid <MonoidFail, F> (Func<F> Fail)
- HeadOrInvalid <Fail> (Fail fail)
- HeadOrInvalid <MonoidFail, Fail> (Fail fail)
- HeadOrLeft <L> (L left)
- HeadOrLeft <L> (Func<L> Left)
- IsEmpty
- Count
- Length
- AsEnumerable ()
- Match <B> ( Func<B> Empty, Func<A, Seq<A>, B> Tail)
- Match <B> ( Func<B> Empty, Func<A, B> Head, Func<A, Seq<A>, B> Tail)
- Match <B> ( Func<B> Empty, Func<Seq<A>, B> Seq)
- Match <B> ( Func<B> Empty, Func<A, B> Head, Func<Seq<A>, B> Tail)
- Do (Action<A> f)
- Iter (Action<A> f)
- Map <B> (Func<A, B> f)
- Select <B> (Func<A, B> f)
- Bind <B> (Func<A, Seq<B>> f)
- SelectMany <B, C> (Func<A, Seq<B>> bind, Func<A, B, C> project)
- Filter (Func<A, bool> f)
- Where (Func<A, bool> f)
- Fold <S> (S state, Func<S, A, S> f)
- FoldBack <S> (S state, Func<S, A, S> f)
- Exists (Func<A, bool> f)
- ForAll (Func<A, bool> f)
- Any ()
- Intersperse (A value)
- GetHashCode ()
- CompareTo (object obj)
- ToString ()
- ToFullString (string separator = ", ")
- ToFullArrayString (string separator = ", ")
- + (Seq<A> x, Seq<A> y)
- > (Seq<A> x, Seq<A> y)
- >= (Seq<A> x, Seq<A> y)
- < (Seq<A> x, Seq<A> y)
- <= (Seq<A> x, Seq<A> y)
- == (Seq<A> x, Seq<A> y)
- != (Seq<A> x, Seq<A> y)
- Equals (object obj)
- Equals (ISeq<A> rhs)
- Equals (Seq<A> rhs)
- Equals <EqA> (Seq<A> rhs)
- Skip (int amount)
- Take (int amount)
- TakeWhile (Func<A, bool> pred)
- TakeWhile (Func<A, int, bool> pred)
- Inits
- NonEmptyInits
- Tails
- NonEmptyTails
- CompareTo (ISeq<A> rhs)
- CompareTo <OrdA> (ISeq<A> rhs)
- CompareTo (Seq<A> rhs)
- CompareTo <OrdA> (Seq<A> rhs)
- Strict ()
- GetEnumerator ()
- Cast <B> ()
- SeqExtensions
- Flatten <A> (this Seq<Seq<A>> ma)
- Count <A> (this ISeq<A> seq)
- Count <A> (this Seq<A> seq)
- First <A> (this ISeq<A> seq)
- First <A> (this Seq<A> seq)
- FirstOrDefault <A> (this ISeq<A> seq)
- FirstOrDefault <A> (this Seq<A> seq)
- Choose <A, B> (this Seq<A> list, Func<A, Option<B>> selector)
- Choose <A, B> (this Seq<A> list, Func<int, A, Option<B>> selector)
- Sum <MonoidA, A> (this Seq<A> list)
- Sum (this Seq<int> list)
- Sum (this Seq<float> list)
- Sum (this Seq<double> list)
- Sum (this Seq<decimal> list)
- Rev <T> (this Seq<T> list)
- Append <T> (this Seq<T> lhs, Seq<T> rhs)
- Append <T> (this Seq<T> x, Seq<Seq<T>> xs)
- FoldWhile <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- FoldWhile <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- FoldBackWhile <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- FoldBackWhile <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- FoldUntil <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- FoldUntil <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- FoldBackUntil <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- FoldBackUntil <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- Reduce <T> (this Seq<T> list, Func<T, T, T> reducer)
- ReduceBack <T> (this Seq<T> list, Func<T, T, T> reducer)
- Scan <S, T> (this Seq<T> list, S state, Func<S, T, S> folder)
- ScanBack <S, T> (this Seq<T> list, S state, Func<S, T, S> folder)
- Find <T> (this Seq<T> list, Func<T, bool> pred)
- FindSeq <T> (this Seq<T> list, Func<T, bool> pred)
- Zip <T, U, V> (this Seq<T> list, Seq<U> other, Func<T, U, V> zipper)
- Zip <T, U> (this Seq<T> list, Seq<U> other)
- Iter <T> (this Seq<T> list, Action<T> action)
- Iter <T> (this Seq<T> list, Action<int, T> action)
- Distinct <T> (this Seq<T> list)
- Distinct <EQ, T> (this Seq<T> list)
- Distinct <T, K> (this Seq<T> list, Func<T, K> keySelector, Option<Func<K, K, bool>> compare = default(Option<Func<K, K, bool>>))
- Apply <A, B> (this Seq<Func<A, B>> fabc, Seq<A> fa)
- Apply <A, B> (this Func<A, B> fabc, Seq<A> fa)
- Apply <A, B, C> (this Seq<Func<A, B, C>> fabc, Seq<A> fa)
- Apply <A, B, C> (this Func<A, B, C> fabc, Seq<A> fa)
- Apply <A, B, C> (this Seq<Func<A, B, C>> fabc, Seq<A> fa, Seq<B> fb)
- Apply <A, B, C> (this Func<A, B, C> fabc, Seq<A> fa, Seq<B> fb)
- Apply <A, B, C> (this Seq<Func<A, Func<B, C>>> fabc, Seq<A> fa)
- Apply <A, B, C> (this Func<A, Func<B, C>> fabc, Seq<A> fa)
- Apply <A, B, C> (this Seq<Func<A, Func<B, C>>> fabc, Seq<A> fa, Seq<B> fb)
- Apply <A, B, C> (this Func<A, Func<B, C>> fabc, Seq<A> fa, Seq<B> fb)
- Action <A, B> (this Seq<A> fa, Seq<B> fb)
- Tails <A> (this Seq<A> self)
- Tailsr <A> (this Seq<A> self)
- Span <T> (this Seq<T> self, Func<T, bool> pred)
- Aggregate <TSource, TAccumulate> (this Seq<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func)
- Aggregate <TSource, TAccumulate, TResult> (this Seq<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, Func<TAccumulate, TResult> resultSelector)
- Aggregate <TSource> (this Seq<TSource> source, Func<TSource, TSource, TSource> func)
- All <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- Any <TSource> (this Seq<TSource> source)
- Any <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- AsEnumerable <TSource> (this Seq<TSource> source)
- AsQueryable <TElement> (this Seq<TElement> source)
- Average (this Seq<decimal> source)
- Average <TSource> (this Seq<TSource> source, Func<TSource, decimal> selector)
- Average (this Seq<decimal?> source)
- Average <TSource> (this Seq<TSource> source, Func<TSource, decimal?> selector)
- Average (this Seq<double> source)
- Average (this Seq<int> source)
- Average (this Seq<long> source)
- Average <TSource> (this Seq<TSource> source, Func<TSource, double> selector)
- Average <TSource> (this Seq<TSource> source, Func<TSource, int> selector)
- Average <TSource> (this Seq<TSource> source, Func<TSource, long> selector)
- Average (this Seq<double?> source)
- Average (this Seq<int?> source)
- Average (this Seq<long?> source)
- Average <TSource> (this Seq<TSource> source, Func<TSource, double?> selector)
- Average <TSource> (this Seq<TSource> source, Func<TSource, int?> selector)
- Average <TSource> (this Seq<TSource> source, Func<TSource, long?> selector)
- Average (this Seq<float> source)
- Average <TSource> (this Seq<TSource> source, Func<TSource, float> selector)
- Average (this Seq<float?> source)
- Average <TSource> (this Seq<TSource> source, Func<TSource, float?> selector)
- Concat <TSource> (this Seq<TSource> first, IEnumerable<TSource> second)
- Contains <TSource> (this Seq<TSource> source, TSource value)
- Contains <TSource> (this Seq<TSource> source, TSource value, IEqualityComparer<TSource> comparer)
- Count <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- DefaultIfEmpty <TSource> (this Seq<TSource> source)
- DefaultIfEmpty <TSource> (this Seq<TSource> source, TSource defaultValue)
- Distinct <TSource> (this Seq<TSource> source, IEqualityComparer<TSource> comparer)
- ElementAt <TSource> (this Seq<TSource> source, int index)
- ElementAtOrDefault <TSource> (this Seq<TSource> source, int index)
- Except <TSource> (this Seq<TSource> first, IEnumerable<TSource> second)
- Except <TSource> (this Seq<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- First <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- FirstOrDefault <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- GroupBy <TSource, TKey, TElement> (this Seq<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
- GroupBy <TSource, TKey, TElement> (this Seq<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
- GroupBy <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector)
- GroupBy <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
- GroupBy <TSource, TKey, TElement, TResult> (this Seq<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector)
- GroupBy <TSource, TKey, TElement, TResult> (this Seq<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey> comparer)
- GroupBy <TSource, TKey, TResult> (this Seq<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector)
- GroupBy <TSource, TKey, TResult> (this Seq<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey> comparer)
- GroupJoin <TOuter, TInner, TKey, TResult> (this Seq<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 Seq<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 Seq<TSource> first, IEnumerable<TSource> second)
- Intersect <TSource> (this Seq<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- Join <TOuter, TInner, TKey, TResult> (this Seq<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector)
- Join <TOuter, TInner, TKey, TResult> (this Seq<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey> comparer)
- Last <TSource> (this Seq<TSource> source)
- Last <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- LastOrDefault <TSource> (this Seq<TSource> source)
- LastOrDefault <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- LongCount <TSource> (this Seq<TSource> source)
- LongCount <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- Max (this Seq<decimal> source)
- Max <TSource> (this Seq<TSource> source, Func<TSource, decimal> selector)
- Max (this Seq<decimal?> source)
- Max <TSource> (this Seq<TSource> source, Func<TSource, decimal?> selector)
- Max (this Seq<double> source)
- Max <TSource> (this Seq<TSource> source, Func<TSource, double> selector)
- Max (this Seq<double?> source)
- Max <TSource> (this Seq<TSource> source, Func<TSource, double?> selector)
- Max (this Seq<float> source)
- Max <TSource> (this Seq<TSource> source, Func<TSource, float> selector)
- Max (this Seq<float?> source)
- Max <TSource> (this Seq<TSource> source, Func<TSource, float?> selector)
- Max (this Seq<int> source)
- Max <TSource> (this Seq<TSource> source, Func<TSource, int> selector)
- Max (this Seq<int?> source)
- Max <TSource> (this Seq<TSource> source, Func<TSource, int?> selector)
- Max (this Seq<long> source)
- Max <TSource> (this Seq<TSource> source, Func<TSource, long> selector)
- Max (this Seq<long?> source)
- Max <TSource> (this Seq<TSource> source, Func<TSource, long?> selector)
- Max <TSource, TResult> (this Seq<TSource> source, Func<TSource, TResult> selector)
- Max <TSource> (this Seq<TSource> source)
- Min (this Seq<decimal> source)
- Min <TSource> (this Seq<TSource> source, Func<TSource, decimal> selector)
- Min (this Seq<decimal?> source)
- Min <TSource> (this Seq<TSource> source, Func<TSource, decimal?> selector)
- Min (this Seq<double> source)
- Min <TSource> (this Seq<TSource> source, Func<TSource, double> selector)
- Min (this Seq<double?> source)
- Min <TSource> (this Seq<TSource> source, Func<TSource, double?> selector)
- Min (this Seq<float> source)
- Min <TSource> (this Seq<TSource> source, Func<TSource, float> selector)
- Min (this Seq<float?> source)
- Min <TSource> (this Seq<TSource> source, Func<TSource, float?> selector)
- Min (this Seq<int> source)
- Min <TSource> (this Seq<TSource> source, Func<TSource, int> selector)
- Min (this Seq<int?> source)
- Min <TSource> (this Seq<TSource> source, Func<TSource, int?> selector)
- Min (this Seq<long> source)
- Min <TSource> (this Seq<TSource> source, Func<TSource, long> selector)
- Min (this Seq<long?> source)
- Min <TSource> (this Seq<TSource> source, Func<TSource, long?> selector)
- Min <TSource, TResult> (this Seq<TSource> source, Func<TSource, TResult> selector)
- Min <TSource> (this Seq<TSource> source)
- OrderBy <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector)
- OrderBy <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)
- OrderByDescending <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector)
- OrderByDescending <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)
- Reverse <TSource> (this Seq<TSource> source)
- SequenceEqual <TSource> (this Seq<TSource> first, IEnumerable<TSource> second)
- SequenceEqual <TSource> (this Seq<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- Single <TSource> (this Seq<TSource> source)
- Single <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- SingleOrDefault <TSource> (this Seq<TSource> source)
- SingleOrDefault <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- Skip <TSource> (this Seq<TSource> source, int count)
- SkipWhile <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- SkipWhile <TSource> (this Seq<TSource> source, Func<TSource, int, bool> predicate)
- Sum <TSource> (this Seq<TSource> source, Func<TSource, decimal> selector)
- Sum (this Seq<decimal?> source)
- Sum <TSource> (this Seq<TSource> source, Func<TSource, decimal?> selector)
- Sum <TSource> (this Seq<TSource> source, Func<TSource, double> selector)
- Sum (this Seq<double?> source)
- Sum <TSource> (this Seq<TSource> source, Func<TSource, double?> selector)
- Sum <TSource> (this Seq<TSource> source, Func<TSource, float> selector)
- Sum (this Seq<float?> source)
- Sum <TSource> (this Seq<TSource> source, Func<TSource, float?> selector)
- Sum <TSource> (this Seq<TSource> source, Func<TSource, int> selector)
- Sum (this Seq<int?> source)
- Sum <TSource> (this Seq<TSource> source, Func<TSource, int?> selector)
- Sum (this Seq<long> source)
- Sum <TSource> (this Seq<TSource> source, Func<TSource, long> selector)
- Sum (this Seq<long?> source)
- Sum <TSource> (this Seq<TSource> source, Func<TSource, long?> selector)
- Take <TSource> (this Seq<TSource> source, int count)
- TakeWhile <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate)
- TakeWhile <TSource> (this Seq<TSource> source, Func<TSource, int, bool> predicate)
- ToArray <TSource> (this Seq<TSource> source)
- ToDictionary <TSource, TKey, TElement> (this Seq<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
- ToDictionary <TSource, TKey, TElement> (this Seq<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
- ToDictionary <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector)
- ToDictionary <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
- ToList <TSource> (this Seq<TSource> source)
- ToLookup <TSource, TKey, TElement> (this Seq<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
- ToLookup <TSource, TKey, TElement> (this Seq<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
- ToLookup <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector)
- ToLookup <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
- Union <TSource> (this Seq<TSource> first, IEnumerable<TSource> second)
- Union <TSource> (this Seq<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- Zip <TFirst, TSecond, TResult> (this Seq<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)
- Seq
- flatten <A> (Seq<Seq<A>> ma)
- empty <A> ()
- create <A> ()
- create <A> (params A[] items)
- createRange <A> (IEnumerable<A> items)
- generate <A> (int count, Func<int, A> generator)
- repeat <A> (A item, int count)
- head <A> (Seq<A> list)
- headOrNone <A> (Seq<A> list)
- headOrInvalid <Fail, A> (Seq<A> list, Fail fail)
- headOrInvalid <MonoidFail, Fail, A> (Seq<A> list, Fail fail)
- headOrLeft <L, A> (Seq<A> list, L left)
- last <A> (Seq<A> list)
- init <A> (Seq<A> list)
- tail <A> (Seq<A> list)
- map <A, B> (Seq<A> list, Func<A, B> map)
- map <A, B> (Seq<A> list, Func<int, A, B> map)
- filter <A> (Seq<A> list, Func<A, bool> predicate)
- choose <A, B> (Seq<A> list, Func<A, Option<B>> selector)
- choose <A, B> (Seq<A> list, Func<int, A, Option<B>> selector)
- sum <MonoidA, A> (Seq<A> list)
- sum (Seq<int> list)
- sum (Seq<float> list)
- sum (Seq<double> list)
- sum (Seq<decimal> list)
- rev <T> (Seq<T> list)
- append <T> (Seq<T> lhs, Seq<T> rhs)
- append <T> (Seq<T> x, Seq<Seq<T>> xs)
- append <T> (params Seq<T>[] lists)
- fold <S, T> (Seq<T> list, S state, Func<S, T, S> folder)
- foldBack <S, T> (Seq<T> list, S state, Func<S, T, S> folder)
- foldWhile <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- foldWhile <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- foldBackWhile <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- foldBackWhile <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- foldUntil <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- foldUntil <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- foldBackUntil <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem)
- foldBackUntil <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate)
- reduce <T> (Seq<T> list, Func<T, T, T> reducer)
- reduceBack <T> (Seq<T> list, Func<T, T, T> reducer)
- scan <S, T> (Seq<T> list, S state, Func<S, T, S> folder)
- scanBack <S, T> (Seq<T> list, S state, Func<S, T, S> folder)
- find <T> (Seq<T> list, Func<T, bool> pred)
- findSeq <T> (Seq<T> list, Func<T, bool> pred)
- zip <T, U, V> (Seq<T> list, Seq<U> other, Func<T, U, V> zipper)
- zip <T, U> (Seq<T> list, Seq<U> other)
- length <T> (Seq<T> list)
- iter <T> (Seq<T> list, Action<T> action)
- iter <T> (Seq<T> list, Action<int, T> action)
- forall <T> (Seq<T> list, Func<T, bool> pred)
- distinct <T> (Seq<T> list)
- distinct <EQ, T> (Seq<T> list)
- distinct <T, K> (Seq<T> list, Func<T, K> keySelector, Option<Func<K, K, bool>> compare = default(Option<Func<K, K, bool>>))
- take <T> (Seq<T> list, int count)
- takeWhile <T> (Seq<T> list, Func<T, bool> pred)
- takeWhile <T> (Seq<T> list, Func<T, int, bool> pred)
- exists <T> (Seq<T> list, Func<T, bool> pred)
- apply <A, B> (Seq<Func<A, B>> fabc, Seq<A> fa)
- apply <A, B> (Func<A, B> fabc, Seq<A> fa)
- apply <A, B, C> (Seq<Func<A, B, C>> fabc, Seq<A> fa)
- apply <A, B, C> (Func<A, B, C> fabc, Seq<A> fa)
- apply <A, B, C> (Seq<Func<A, B, C>> fabc, Seq<A> fa, Seq<B> fb)
- apply <A, B, C> (Func<A, B, C> fabc, Seq<A> fa, Seq<B> fb)
- apply <A, B, C> (Seq<Func<A, Func<B, C>>> fabc, Seq<A> fa)
- apply <A, B, C> (Func<A, Func<B, C>> fabc, Seq<A> fa)
- apply <A, B, C> (Seq<Func<A, Func<B, C>>> fabc, Seq<A> fa, Seq<B> fb)
- apply <A, B, C> (Func<A, Func<B, C>> fabc, Seq<A> fa, Seq<B> fb)
- action <A, B> (Seq<A> fa, Seq<B> fb)
- tails <A> (Seq<A> self)
- tailsr <A> (Seq<A> self)
- span <T> (Seq<T> self, Func<T, bool> pred)
- SeqEmpty
- Enumerator
- SeqLoan <A>
- Rent (ArrayPool<A> pool, int size)
- Rent (int size)
- this []
- Head
- ToSeq ()
- ToReadOnlySpan ()
- ToSpan ()
- Tail
- Init
- IsEmpty
- Last
- Count
- Fold <S> (S state, Func<S, A, S> f)
- FoldBack <S> (S state, Func<S, A, S> f)
- Skip (int amount)
- Take (int amount)
- GetEnumerator ()
- Iter (Action<A> f)
- Exists (Func<A, bool> f)
- ForAll (Func<A, bool> f)
- Append (Seq<A> right)
- Append (SeqLoan<A> right)
- GetHashCode ()
- Dispose ()
Cons sequence Represents a sequence of values in a similar way to IEnumerable, but without the issues of multiple evaluation for key LINQ operators like Skip, Count, etc.
Cons sequence Represents a sequence of values in a similar way to IEnumerable, but without the issues of multiple evaluation for key LINQ operators like Skip, Count, etc.
type | A | Type of the values in the sequence |
field Seq<A> Empty = new Seq<A>(SeqEmptyInternal<A>.Default) Source #
Empty sequence
property Lens<Seq<A>, Option<A>> headOrNone Source #
Head or none lens
property Lens<Seq<A>, Option<A>> lastOrNone Source #
Last or none lens
Head item in the sequence. NOTE: If IsEmpty
is true then Head
is undefined. Call HeadOrNone() if for maximum safety.
property bool IsEmpty Source #
Returns true if the sequence is empty
For lazy streams this will have to peek at the first item. So, the first item will be consumed.
Returns the number of items in the sequence
returns | Number of items in the sequence |
property Seq<Seq<A>> Inits Source #
Returns all initial segments of the sequence, shortest first
Including the empty sequence
returns | Initial segments of the sequence |
Seq("a", "b", "c").Inits
> Seq(Seq(), Seq("a"), Seq("a", "b"), Seq("a", "b", "c"))
property Seq<Seq<A>> NonEmptyInits Source #
Returns all initial segments of the sequence, shortest first.
Not including the empty sequence
returns | Initial segments of the sequence |
Seq("a", "b", "c").Inits
> Seq(Seq("a"), Seq("a", "b"), Seq("a", "b", "c"))
property Seq<Seq<A>> Tails Source #
Returns all final segments of the argument, longest first.
Including the empty sequence
returns | Initial segments of the sequence |
Seq("a", "b", "c").Tails
> Seq(Seq("a", "b", "c"), Seq("a", "b"), Seq("a"), Seq())
property Seq<Seq<A>> NonEmptyTails Source #
Returns all final segments of the argument, longest first.
Not including the empty sequence
returns | Initial segments of the sequence |
Seq("a", "b", "c").Tails
> Seq(Seq("a", "b", "c"), Seq("a", "b"), Seq("a"))
method void Deconstruct (out A head, out Seq<A> tail) Source #
method Seq<A> Add (A value) Source #
Add an item to the end of the sequence
Forces evaluation of the entire lazy sequence so the item can be appended
method Seq<A> Concat (IEnumerable<A> items) Source #
Add a range of items to the end of the sequence
Forces evaluation of the entire lazy sequence so the items can be appended.
method Seq<A> Concat (Lst<A> items) Source #
Add a range of items to the end of the sequence
Forces evaluation of the entire lazy sequence so the items can be appended.
method Seq<A> Concat (Set<A> items) Source #
Add a range of items to the end of the sequence
Forces evaluation of the entire lazy sequence so the items can be appended.
method Seq<A> Concat (HashSet<A> items) Source #
Add a range of items to the end of the sequence
Forces evaluation of the entire lazy sequence so the items can be appended.
method Seq<A> Concat (Arr<A> items) Source #
Add a range of items to the end of the sequence
Forces evaluation of the entire lazy sequence so the items can be appended.
method Seq<A> Concat (Stck<A> items) Source #
Add a range of items to the end of the sequence
Forces evaluation of the entire lazy sequence so the items can be appended.
method Seq<A> Concat (IReadOnlyCollection<A> items) Source #
Add a range of items to the end of the sequence
Forces evaluation of the entire lazy sequence so the items can be appended.
method Seq<A> Concat (Seq<A> rhs) Source #
Add a range of items to the end of the sequence
Forces evaluation of the entire lazy sequence so the items can be appended.
method Option<A> HeadOrNone () Source #
Head of the sequence if this node isn't the empty node
method Option<A> LastOrNone () Source #
Last item in sequence.
method Either<L, A> LastOrLeft <L> (L Left) Source #
Last item in sequence.
method Either<L, A> LastOrLeft <L> (Func<L> Left) Source #
Last item in sequence.
method Validation<F, A> LastOrInvalid <F> (F Fail) Source #
Last item in sequence.
method Validation<F, A> LastOrInvalid <F> (Func<F> Fail) Source #
Last item in sequence.
method Validation<MonoidFail, F, A> LastOrInvalid <MonoidFail, F> (F Fail) Source #
Last item in sequence.
method Validation<MonoidFail, F, A> LastOrInvalid <MonoidFail, F> (Func<F> Fail) Source #
Last item in sequence.
method Validation<Fail, A> HeadOrInvalid <Fail> (Fail fail) Source #
Head of the sequence if this node isn't the empty node or fail
type | Fail | |
param | fail | Fail case |
returns | Head of the sequence or fail |
method Validation<MonoidFail, Fail, A> HeadOrInvalid <MonoidFail, Fail> (Fail fail) Source #
Head of the sequence
method Either<L, A> HeadOrLeft <L> (L left) Source #
Head of the sequence if this node isn't the empty node or left
type | L | |
param | left | Left case |
returns | Head of the sequence or left |
method Either<L, A> HeadOrLeft <L> (Func<L> Left) Source #
Head of the sequence if this node isn't the empty node
method IEnumerable<A> AsEnumerable () Source #
Stream as an enumerable
method B Match <B> ( Func<B> Empty, Func<A, Seq<A>, B> Tail) Source #
Match empty sequence, or multi-item sequence
type | B | Return value type |
param | Empty | Match for an empty list |
param | Tail | Match for a non-empty |
returns | Result of match function invoked |
method B Match <B> ( Func<B> Empty, Func<A, B> Head, Func<A, Seq<A>, B> Tail) Source #
Match empty sequence, or one item sequence, or multi-item sequence
type | B | Return value type |
param | Empty | Match for an empty list |
param | Tail | Match for a non-empty |
returns | Result of match function invoked |
method B Match <B> ( Func<B> Empty, Func<Seq<A>, B> Seq) Source #
Match empty sequence, or multi-item sequence
type | B | Return value type |
param | Empty | Match for an empty list |
param | Sequence | Match for a non-empty |
returns | Result of match function invoked |
method B Match <B> ( Func<B> Empty, Func<A, B> Head, Func<Seq<A>, B> Tail) Source #
Match empty sequence, or one item sequence, or multi-item sequence
type | B | Return value type |
param | Empty | Match for an empty list |
param | Tail | Match for a non-empty |
returns | Result of match function invoked |
method Seq<A> Do (Action<A> f) Source #
Impure iteration of the bound values in the structure
returns | Returns the original unmodified structure |
method Unit Iter (Action<A> f) Source #
Impure iteration of the bound values in the structure
returns | Returns the original unmodified structure |
method Seq<B> Map <B> (Func<A, B> f) Source #
Map the sequence using the function provided
type | B | |
param | f | Mapping function |
returns | Mapped sequence |
method Seq<B> Select <B> (Func<A, B> f) Source #
Map the sequence using the function provided
type | B | |
param | f | Mapping function |
returns | Mapped sequence |
method Seq<B> Bind <B> (Func<A, Seq<B>> f) Source #
Monadic bind (flatmap) of the sequence
type | B | Bound return value type |
param | f | Bind function |
returns | Flatmapped sequence |
method Seq<C> SelectMany <B, C> (Func<A, Seq<B>> bind, Func<A, B, C> project) Source #
Monadic bind (flatmap) of the sequence
type | B | Bound return value type |
param | bind | Bind function |
returns | Flatmapped sequence |
method Seq<A> Filter (Func<A, bool> f) Source #
Filter the items in the sequence
param | f | Predicate to apply to the items |
returns | Filtered sequence |
method Seq<A> Where (Func<A, bool> f) Source #
Filter the items in the sequence
param | f | Predicate to apply to the items |
returns | Filtered sequence |
method S Fold <S> (S state, Func<S, A, S> f) Source #
Fold the sequence from the first item to the last
type | S | State type |
param | state | Initial state |
param | f | Fold function |
returns | Aggregated state |
method S FoldBack <S> (S state, Func<S, A, S> f) Source #
Fold the sequence from the last item to the first. For sequences that are not lazy and are less than 5000 items long, FoldBackRec is called instead, because it is faster.
type | S | State type |
param | state | Initial state |
param | f | Fold function |
returns | Aggregated state |
method bool Exists (Func<A, bool> f) Source #
Returns true if the supplied predicate returns true for any item in the sequence. False otherwise.
param | f | Predicate to apply |
returns | True if the supplied predicate returns true for any item in the sequence. False otherwise. |
method bool ForAll (Func<A, bool> f) Source #
Returns true if the supplied predicate returns true for all items in the sequence. False otherwise. If there is an empty sequence then true is returned.
param | f | Predicate to apply |
returns | True if the supplied predicate returns true for all items in the sequence. False otherwise. If there is an empty sequence then true is returned. |
Returns true if the sequence has items in it
returns | True if the sequence has items in it |
method Seq<A> Intersperse (A value) Source #
Inject a value in between each item in the sequence
type | A | Bound type |
param | ma | Sequence to inject values into |
param | value | Item to inject |
returns | A sequence with the values injected |
method int GetHashCode () Source #
Get the hash code for all of the items in the sequence, or 0 if empty
returns |
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 Seq<A> TakeWhile (Func<A, bool> pred) Source #
Iterate the sequence, yielding items if they match the predicate provided, and stopping as soon as one doesn't
returns | A new sequence with the first items that match the predicate |
method Seq<A> TakeWhile (Func<A, int, bool> pred) Source #
Iterate the sequence, 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.
returns | A new sequence with the first items that match the predicate |
method int CompareTo <OrdA> (ISeq<A> rhs) Source #
Compare to another sequence
method int CompareTo <OrdA> (Seq<A> rhs) Source #
Compare to another sequence
method IEnumerator<A> GetEnumerator () Source #
class SeqExtensions Source #
method A FirstOrDefault <A> (this ISeq<A> seq) Source #
Get the head item in the sequence
method A FirstOrDefault <A> (this Seq<A> seq) Source #
Get the head item in the sequence
method Seq<B> Choose <A, B> (this Seq<A> list, Func<A, Option<B>> selector) Source #
Applies the given function 'selector' to each element of the sequence. Returns the sequence comprised of the results for each element where the function returns Some(f(x)).
type | A | sequence item type |
param | list | sequence |
param | selector | Selector function |
returns | Mapped and filtered sequence |
method Seq<B> Choose <A, B> (this Seq<A> list, Func<int, A, Option<B>> selector) Source #
Applies the given function 'selector' to each element of the sequence. Returns the sequence 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 | A | sequence item type |
param | list | sequence |
param | selector | Selector function |
returns | Mapped and filtered sequence |
method A Sum <MonoidA, A> (this Seq<A> 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 int Sum (this Seq<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 (this Seq<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 (this Seq<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 (this Seq<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 Seq<T> Rev <T> (this Seq<T> list) Source #
Reverses the sequence (Reverse in LINQ)
type | T | sequence item type |
param | list | sequence to reverse |
returns | Reversed sequence |
method Seq<T> Append <T> (this Seq<T> lhs, Seq<T> rhs) Source #
Concatenate two sequences (Concat in LINQ)
type | T | sequence item type |
param | lhs | First sequence |
param | rhs | Second sequence |
returns | Concatenated sequence |
method Seq<T> Append <T> (this Seq<T> x, Seq<Seq<T>> xs) Source #
Concatenate a sequence and a sequence of sequences
type | T | List item type |
param | lhs | First list |
param | rhs | Second list |
returns | Concatenated list |
method S FoldWhile <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the sequence 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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S FoldWhile <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the sequence, 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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method S FoldBackWhile <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the sequence (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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S FoldBackWhile <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the sequence (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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method S FoldUntil <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the sequence 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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S FoldUntil <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the sequence, 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 sequence. 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 Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the sequence (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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S FoldBackUntil <S, T> (this Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the sequence (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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method T Reduce <T> (this Seq<T> list, Func<T, T, T> reducer) Source #
Applies a function to each element of the sequence, threading an accumulator argument through the computation. This function first applies the function to the first two elements of the sequence. Then, it passes this result into the function along with the third element and so on. Finally, it returns the final result.
type | T | sequence item type |
param | list | sequence to reduce |
param | reducer | Reduce function |
returns | Aggregate value |
method T ReduceBack <T> (this Seq<T> list, Func<T, T, T> reducer) Source #
Applies a function to each element of the sequence (from last element to first), threading an accumulator argument through the computation. This function first applies the function to the last two elements of the sequence. Then, it passes this result into the function along with the previous element and so on. Finally, it returns the final result.
type | T | sequence item type |
param | list | sequence to reduce |
param | reducer | Reduce function |
returns | Aggregate value |
method Seq<S> Scan <S, T> (this Seq<T> list, S state, Func<S, T, S> folder) Source #
Applies a function to each element of the sequence, 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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Folding function |
returns | Aggregate state |
method Seq<S> ScanBack <S, T> (this Seq<T> list, S state, Func<S, T, S> folder) Source #
Applies a function to each element of the sequence (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 sequence. 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> (this Seq<T> list, Func<T, bool> pred) Source #
Returns Some(x) for the first item in the sequence that matches the predicate provided, None otherwise.
type | T | sequence item type |
param | list | sequence to search |
param | pred | Predicate |
returns | Some(x) for the first item in the sequence that matches the predicate provided, None otherwise. |
method Seq<T> FindSeq <T> (this Seq<T> list, Func<T, bool> pred) Source #
Returns [x] for the first item in the sequence that matches the predicate provided, [] otherwise.
type | T | sequence item type |
param | list | sequence to search |
param | pred | Predicate |
returns | [x] for the first item in the sequence that matches the predicate provided, [] otherwise. |
method Seq<V> Zip <T, U, V> (this Seq<T> list, Seq<U> other, Func<T, U, V> zipper) Source #
Joins two sequences together either into a single sequence using the join function provided
param | list | First sequence to join |
param | other | Second sequence to join |
param | zipper | Join function |
returns | Joined sequence |
method Seq<(T Left, U Right)> Zip <T, U> (this Seq<T> list, Seq<U> other) Source #
Joins two sequences together either into an sequence of tuples
param | list | First sequence to join |
param | other | Second sequence to join |
param | zipper | Join function |
returns | Joined sequence of tuples |
method Unit Iter <T> (this Seq<T> list, Action<T> action) Source #
Invokes an action for each item in the sequence in order
type | T | sequence item type |
param | list | sequence to iterate |
param | action | Action to invoke with each item |
returns | Unit |
method Unit Iter <T> (this Seq<T> list, Action<int, T> action) Source #
Invokes an action for each item in the sequence in order and supplies a running index value.
type | T | sequence item type |
param | list | sequence to iterate |
param | action | Action to invoke with each item |
returns | Unit |
method Seq<T> Distinct <T> (this Seq<T> list) Source #
Return a new sequence with all duplicate values removed
type | T | sequence item type |
param | list | sequence |
returns | A new sequence with all duplicate values removed |
method Seq<T> Distinct <EQ, T> (this Seq<T> list) Source #
Return a new sequence with all duplicate values removed
type | T | sequence item type |
param | list | sequence |
returns | A new sequence with all duplicate values removed |
method Seq<T> Distinct <T, K> (this Seq<T> list, Func<T, K> keySelector, Option<Func<K, K, bool>> compare = default(Option<Func<K, K, bool>>)) Source #
Return a new sequence with all duplicate values removed
type | T | sequence item type |
param | list | sequence |
returns | A new sequence with all duplicate values removed |
method Seq<B> Apply <A, B> (this Seq<Func<A, B>> fabc, Seq<A> fa) Source #
Apply a sequence of values to a sequence of functions
param | fabc | sequence of functions |
param | fa | sequence of argument values |
returns | Returns the result of applying the sequence argument values to the sequence functions |
method Seq<B> Apply <A, B> (this Func<A, B> fabc, Seq<A> fa) Source #
Apply a sequence of values to a sequence of functions
param | fabc | sequence of functions |
param | fa | sequence of argument values |
returns | Returns the result of applying the sequence argument values to the sequence functions |
method Seq<Func<B, C>> Apply <A, B, C> (this Seq<Func<A, B, C>> fabc, Seq<A> fa) Source #
Apply a sequence of values to a sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
returns | Returns the result of applying the sequence of argument values to the IEnumerable of functions: a sequence of functions of arity 1 |
method Seq<Func<B, C>> Apply <A, B, C> (this Func<A, B, C> fabc, Seq<A> fa) Source #
Apply a sequence of values to a sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
returns | Returns the result of applying the sequence of argument values to the sequence of functions: a sequence of functions of arity 1 |
method Seq<C> Apply <A, B, C> (this Seq<Func<A, B, C>> fabc, Seq<A> fa, Seq<B> fb) Source #
Apply sequence of values to a sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
param | fb | sequence argument values |
returns | Returns the result of applying the sequence of arguments to the sequence of functions |
method Seq<C> Apply <A, B, C> (this Func<A, B, C> fabc, Seq<A> fa, Seq<B> fb) Source #
Apply sequence of values to an sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
param | fb | sequence argument values |
returns | Returns the result of applying the sequence of arguments to the sequence of functions |
method Seq<Func<B, C>> Apply <A, B, C> (this Seq<Func<A, Func<B, C>>> fabc, Seq<A> fa) Source #
Apply a sequence of values to a sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
returns | Returns the result of applying the sequence of argument values to the sequence of functions: a sequence of functions of arity 1 |
method Seq<Func<B, C>> Apply <A, B, C> (this Func<A, Func<B, C>> fabc, Seq<A> fa) Source #
Apply an sequence of values to an sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
returns | Returns the result of applying the sequence of argument values to the sequence of functions: a sequence of functions of arity 1 |
method Seq<C> Apply <A, B, C> (this Seq<Func<A, Func<B, C>>> fabc, Seq<A> fa, Seq<B> fb) Source #
Apply sequence of values to an sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
param | fb | sequence argument values |
returns | Returns the result of applying the sequence of arguments to the sequence of functions |
method Seq<C> Apply <A, B, C> (this Func<A, Func<B, C>> fabc, Seq<A> fa, Seq<B> fb) Source #
Apply sequence of values to a sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
param | fb | sequence argument values |
returns | Returns the result of applying the sequence of arguments to the sequence of functions |
method Seq<B> Action <A, B> (this Seq<A> fa, Seq<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 Seq<Seq<A>> Tails <A> (this Seq<A> self) Source #
The tails function returns all final segments of the argument, longest first. For example:
tails(['a','b','c']) == [['a','b','c'], ['b','c'], ['c'],[]]
type | A | Seq item type |
param | self | Seq |
returns | Seq of Seq of A |
method Seq<Seq<A>> Tailsr <A> (this Seq<A> self) Source #
The tailsr function returns all final segments of the argument, longest first. For example:
tails(['a','b','c']) == [['a','b','c'], ['b','c'], ['c'],[]]
Differs from tails
in implementation only. The tailsr
uses recursive processing
whereas tails
uses a while loop aggregation followed by a reverse. For small sequences
tailsr
is probably more efficient.
of the Se
type | A | Seq item type |
param | self | Seq |
returns | Seq of Seq of A |
method (Seq<T>, Seq<T>) Span <T> (this Seq<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 |
Seq.span(List(1,2,3,4,1,2,3,4), x => x < 3) == (List(1,2),List(3,4,1,2,3,4))
Seq.span(List(1,2,3), x => x < 9) == (List(1,2,3),List())
Seq.span(List(1,2,3), x => x < 0) == (List(),List(1,2,3))
method TAccumulate Aggregate <TSource, TAccumulate> (this Seq<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 Seq<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 Seq<TSource> source, Func<TSource, TSource, TSource> func) Source #
Applies an accumulator function over a sequence.
method bool All <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate) Source #
Determines whether all elements of a sequence satisfy a condition.
method bool Any <TSource> (this Seq<TSource> source) Source #
Determines whether a sequence contains any elements.
method bool Any <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate) Source #
Determines whether any element of a sequence satisfies a condition.
method IEnumerable<TSource> AsEnumerable <TSource> (this Seq<TSource> source) Source #
Returns the input typed as IEnumerable
method IQueryable<TElement> AsQueryable <TElement> (this Seq<TElement> source) Source #
Converts a generic IEnumerable
method decimal Average (this Seq<decimal> source) Source #
Computes the average of a sequence of Decimal values.
method decimal Average <TSource> (this Seq<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 Seq<decimal?> source) Source #
Computes the average of a sequence of nullable Decimal values.
method decimal? Average <TSource> (this Seq<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 Seq<double> source) Source #
Computes the average of a sequence of Double values.
method double Average (this Seq<int> source) Source #
Computes the average of a sequence of Int32 values.
method double Average (this Seq<long> source) Source #
Computes the average of a sequence of Int64 values.
method double Average <TSource> (this Seq<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 Seq<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 Seq<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 Seq<double?> source) Source #
Computes the average of a sequence of nullable Double values.
method double? Average (this Seq<int?> source) Source #
Computes the average of a sequence of nullable Int32 values.
method double? Average (this Seq<long?> source) Source #
Computes the average of a sequence of nullable Int64 values.
method double? Average <TSource> (this Seq<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 Seq<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 Seq<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 Seq<float> source) Source #
Computes the average of a sequence of Single values.
method float Average <TSource> (this Seq<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 Seq<float?> source) Source #
Computes the average of a sequence of nullable Single values.
method float? Average <TSource> (this Seq<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 Seq<TSource> first, IEnumerable<TSource> second) Source #
Concatenates two sequences.
method bool Contains <TSource> (this Seq<TSource> source, TSource value) Source #
Determines whether a sequence contains a specified element by using the default equality comparer.
method bool Contains <TSource> (this Seq<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 Seq<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 Seq<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 Seq<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 Seq<TSource> source, IEqualityComparer<TSource> comparer) Source #
Returns distinct elements from a sequence by using a specified IEqualityComparer
method TSource ElementAt <TSource> (this Seq<TSource> source, int index) Source #
Returns the element at a specified index in a sequence.
method TSource ElementAtOrDefault <TSource> (this Seq<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 Seq<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 Seq<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 Seq<TSource> source, Func<TSource, bool> predicate) Source #
Returns the first element in a sequence that satisfies a specified condition.
method TSource FirstOrDefault <TSource> (this Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<TSource> source) Source #
Returns the last element of a sequence.
method TSource Last <TSource> (this Seq<TSource> source, Func<TSource, bool> predicate) Source #
Returns the last element of a sequence that satisfies a specified condition.
method TSource LastOrDefault <TSource> (this Seq<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 Seq<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 Seq<TSource> source) Source #
Returns an Int64 that represents the total number of elements in a sequence.
method long LongCount <TSource> (this Seq<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 Seq<decimal> source) Source #
Returns the maximum value in a sequence of Decimal values.
method decimal Max <TSource> (this Seq<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 Seq<decimal?> source) Source #
Returns the maximum value in a sequence of nullable Decimal values.
method decimal? Max <TSource> (this Seq<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 Seq<double> source) Source #
Returns the maximum value in a sequence of Double values.
method double Max <TSource> (this Seq<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 Seq<double?> source) Source #
Returns the maximum value in a sequence of nullable Double values.
method double? Max <TSource> (this Seq<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 Seq<float> source) Source #
Returns the maximum value in a sequence of Single values.
method float Max <TSource> (this Seq<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 Seq<float?> source) Source #
Returns the maximum value in a sequence of nullable Single values.
method float? Max <TSource> (this Seq<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 Seq<int> source) Source #
Returns the maximum value in a sequence of Int32 values.
method int Max <TSource> (this Seq<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 Seq<int?> source) Source #
Returns the maximum value in a sequence of nullable Int32 values.
method int? Max <TSource> (this Seq<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 Seq<long> source) Source #
Returns the maximum value in a sequence of Int64 values.
method long Max <TSource> (this Seq<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 Seq<long?> source) Source #
Returns the maximum value in a sequence of nullable Int64 values.
method long? Max <TSource> (this Seq<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 Seq<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 Seq<TSource> source) Source #
Returns the maximum value in a generic sequence.
method decimal Min (this Seq<decimal> source) Source #
Returns the minimum value in a sequence of Decimal values.
method decimal Min <TSource> (this Seq<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 Seq<decimal?> source) Source #
Returns the minimum value in a sequence of nullable Decimal values.
method decimal? Min <TSource> (this Seq<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 Seq<double> source) Source #
Returns the minimum value in a sequence of Double values.
method double Min <TSource> (this Seq<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 Seq<double?> source) Source #
Returns the minimum value in a sequence of nullable Double values.
method double? Min <TSource> (this Seq<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 Seq<float> source) Source #
Returns the minimum value in a sequence of Single values.
method float Min <TSource> (this Seq<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 Seq<float?> source) Source #
Returns the minimum value in a sequence of nullable Single values.
method float? Min <TSource> (this Seq<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 Seq<int> source) Source #
Returns the minimum value in a sequence of Int32 values.
method int Min <TSource> (this Seq<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 Seq<int?> source) Source #
Returns the minimum value in a sequence of nullable Int32 values.
method int? Min <TSource> (this Seq<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 Seq<long> source) Source #
Returns the minimum value in a sequence of Int64 values.
method long Min <TSource> (this Seq<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 Seq<long?> source) Source #
Returns the minimum value in a sequence of nullable Int64 values.
method long? Min <TSource> (this Seq<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 Seq<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 Seq<TSource> source) Source #
Returns the minimum value in a generic sequence.
method IOrderedEnumerable<TSource> OrderBy <TSource, TKey> (this Seq<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 Seq<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 Seq<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 Seq<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 Seq<TSource> source) Source #
Inverts the order of the elements in a sequence.
method bool SequenceEqual <TSource> (this Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 Seq<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 <TSource> (this Seq<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 Seq<decimal?> source) Source #
Computes the sum of a sequence of nullable Decimal values.
method decimal? Sum <TSource> (this Seq<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 <TSource> (this Seq<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 Seq<double?> source) Source #
Computes the sum of a sequence of nullable Double values.
method double? Sum <TSource> (this Seq<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 Seq<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 Seq<float?> source) Source #
Computes the sum of a sequence of nullable Single values.
method float? Sum <TSource> (this Seq<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 Seq<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 Seq<int?> source) Source #
Computes the sum of a sequence of nullable Int32 values.
method int? Sum <TSource> (this Seq<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 Seq<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 Seq<long?> source) Source #
Computes the sum of a sequence of nullable Int64 values.
method long? Sum <TSource> (this Seq<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 Seq<TSource> source, int count) Source #
Returns a specified number of contiguous elements from the start of a sequence.
method IEnumerable<TSource> TakeWhile <TSource> (this Seq<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 Seq<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 Seq<TSource> source) Source #
Creates an array from a IEnumerable
method Dictionary<TKey, TElement> ToDictionary <TSource, TKey, TElement> (this Seq<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 Seq<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 Seq<TSource> source, Func<TSource, TKey> keySelector) Source #
Creates a Dictionary<TKey,TValue> from an IEnumerable
method Dictionary<TKey, TSource> ToDictionary <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer) Source #
Creates a Dictionary<TKey,TValue> from an IEnumerable
method List<TSource> ToList <TSource> (this Seq<TSource> source) Source #
Creates a List
method ILookup<TKey, TElement> ToLookup <TSource, TKey, TElement> (this Seq<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 Seq<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 Seq<TSource> source, Func<TSource, TKey> keySelector) Source #
Creates a Lookup<TKey,TElement> from an IEnumerable
method ILookup<TKey, TSource> ToLookup <TSource, TKey> (this Seq<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer) Source #
Creates a Lookup<TKey,TElement> from an IEnumerable
method IEnumerable<TSource> Union <TSource> (this Seq<TSource> first, IEnumerable<TSource> second) Source #
Produces the set union of two sequences by using the default equality comparer.
Cons sequence module Represents a sequence of values in a similar way to IEnumerable, but without the issues of multiple evaluation for key LINQ operators like Skip, Count, etc.
type | A | Type of the values in the sequence |
method Seq<A> create <A> (params A[] items) Source #
Create a sequence from a initial set of items
param | items | Items |
returns | sequence |
method Seq<A> createRange <A> (IEnumerable<A> items) Source #
Create a sequence from an initial set of items
param | items | Items |
returns | sequence |
method Seq<A> generate <A> (int count, Func<int, A> generator) Source #
Generates a sequence of A using the provided delegate to initialise each item.
method Seq<A> repeat <A> (A item, int count) Source #
Generates a sequence that contains one repeated value.
method A head <A> (Seq<A> list) Source #
Get the item at the head (first) of the sequence
param | list | sequence |
returns | Head item |
method Option<A> headOrNone <A> (Seq<A> list) Source #
Get the item at the head (first) of the sequence or None if the sequence is empty
param | list | sequence |
returns | Optional head item |
method Validation<Fail, A> headOrInvalid <Fail, A> (Seq<A> list, Fail fail) Source #
Get the item at the head (first) of the sequence or Fail if the sequence is empty
param | list | sequence |
param | fail | Fail case |
returns | Validated head item |
method Validation<MonoidFail, Fail, A> headOrInvalid <MonoidFail, Fail, A> (Seq<A> list, Fail fail) Source #
Get the item at the head (first) of the sequence or Fail if the sequence is empty
param | list | sequence |
param | fail | Fail case |
returns | Validated head item |
method Either<L, A> headOrLeft <L, A> (Seq<A> list, L left) Source #
Get the item at the head (first) of the sequence or Left if the sequence is empty
param | list | sequence |
param | left | Left case |
returns | Either head item or left |
method A last <A> (Seq<A> list) Source #
Get the last item of the sequence
param | list | sequence |
returns | Last item |
method Seq<A> init <A> (Seq<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 Seq<A> tail <A> (Seq<A> list) Source #
Get the tail of the sequence (skips the head item)
param | list | sequence |
returns | Tail sequence |
method Seq<B> map <A, B> (Seq<A> list, Func<A, B> map) Source #
Projects the values in the sequence using a map function into a new sequence (Select in LINQ).
type | A | sequence item type |
type | B | Return sequence item type |
param | list | sequence to map |
param | map | Map function |
returns | Mapped sequence |
method Seq<B> map <A, B> (Seq<A> list, Func<int, A, B> map) Source #
Projects the values in the sequence into a new sequnce 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 | A | sequence item type |
type | B | Return sequence item type |
param | list | sequence to map |
param | map | Map function |
returns | Mapped sequence |
method Seq<A> filter <A> (Seq<A> list, Func<A, bool> predicate) Source #
Removes items from the sequence that do not match the given predicate (Where in LINQ)
type | A | sequence item type |
param | list | sequence to filter |
param | predicate | Predicate function |
returns | Filtered sequence |
method Seq<B> choose <A, B> (Seq<A> list, Func<A, Option<B>> selector) Source #
Applies the given function 'selector' to each element of the sequence. Returns the sequence comprised of the results for each element where the function returns Some(f(x)).
type | A | sequence item type |
param | list | sequence |
param | selector | Selector function |
returns | Mapped and filtered sequence |
method Seq<B> choose <A, B> (Seq<A> list, Func<int, A, Option<B>> selector) Source #
Applies the given function 'selector' to each element of the sequence. Returns the sequence 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 | A | sequence item type |
param | list | sequence |
param | selector | Selector function |
returns | Mapped and filtered sequence |
method A sum <MonoidA, A> (Seq<A> 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 int sum (Seq<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 (Seq<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 (Seq<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 (Seq<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 Seq<T> rev <T> (Seq<T> list) Source #
Reverses the sequence (Reverse in LINQ)
type | T | sequence item type |
param | list | sequence to reverse |
returns | Reversed sequence |
method Seq<T> append <T> (Seq<T> lhs, Seq<T> rhs) Source #
Concatenate two sequences (Concat in LINQ)
type | T | sequence item type |
param | lhs | First sequence |
param | rhs | Second sequence |
returns | Concatenated sequence |
method Seq<T> append <T> (Seq<T> x, Seq<Seq<T>> xs) Source #
Concatenate a sequence and a sequence of sequences
type | T | List item type |
param | lhs | First list |
param | rhs | Second list |
returns | Concatenated list |
method Seq<T> append <T> (params Seq<T>[] lists) Source #
Concatenate N sequences
type | T | sequence type |
param | lists | sequences to concatenate |
returns | A single sequence with all of the items concatenated |
method S fold <S, T> (Seq<T> list, S state, Func<S, T, S> folder) Source #
Applies a function 'folder' to each element of the sequence, 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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Aggregate value |
method S foldBack <S, T> (Seq<T> list, S state, Func<S, T, S> folder) Source #
Applies a function 'folder' to each element of the sequence (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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
returns | Aggregate value |
method S foldWhile <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the sequence 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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S foldWhile <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the sequence, 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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method S foldBackWhile <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the sequence (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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S foldBackWhile <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the sequence (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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method S foldUntil <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the sequence 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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S foldUntil <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the sequence, 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 sequence. 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> (Seq<T> list, S state, Func<S, T, S> folder, Func<T, bool> preditem) Source #
Applies a function 'folder' to each element of the sequence (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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | preditem | Predicate function |
returns | Aggregate value |
method S foldBackUntil <S, T> (Seq<T> list, S state, Func<S, T, S> folder, Func<S, bool> predstate) Source #
Applies a function 'folder' to each element of the sequence (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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Fold function |
param | predstate | Predicate function |
returns | Aggregate value |
method T reduce <T> (Seq<T> list, Func<T, T, T> reducer) Source #
Applies a function to each element of the sequence (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 sequence. Then, it passes this result into the function along with the third element and so on. Finally, it returns the final result.
type | T | sequence item type |
param | list | sequence to reduce |
param | reducer | Reduce function |
returns | Aggregate value |
method T reduceBack <T> (Seq<T> list, Func<T, T, T> reducer) Source #
Applies a function to each element of the sequence, threading an accumulator argument through the computation. This function first applies the function to the first two elements of the sequence. Then, it passes this result into the function along with the third element and so on. Finally, it returns the final result.
type | T | sequence item type |
param | list | sequence to reduce |
param | reducer | Reduce function |
returns | Aggregate value |
method Seq<S> scan <S, T> (Seq<T> list, S state, Func<S, T, S> folder) Source #
Applies a function to each element of the sequence, 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 sequence. 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 | sequence item type |
param | list | sequence to fold |
param | state | Initial state |
param | folder | Folding function |
returns | Aggregate state |
method Seq<S> scanBack <S, T> (Seq<T> list, S state, Func<S, T, S> folder) Source #
Applies a function to each element of the sequence (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 sequence. 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> (Seq<T> list, Func<T, bool> pred) Source #
Returns Some(x) for the first item in the sequence that matches the predicate provided, None otherwise.
type | T | sequence item type |
param | list | sequence to search |
param | pred | Predicate |
returns | Some(x) for the first item in the sequence that matches the predicate provided, None otherwise. |
method Seq<T> findSeq <T> (Seq<T> list, Func<T, bool> pred) Source #
Returns [x] for the first item in the sequence that matches the predicate provided, [] otherwise.
type | T | sequence item type |
param | list | sequence to search |
param | pred | Predicate |
returns | [x] for the first item in the sequence that matches the predicate provided, [] otherwise. |
method Seq<V> zip <T, U, V> (Seq<T> list, Seq<U> other, Func<T, U, V> zipper) Source #
Joins two sequences together either into a single sequence using the join function provided
param | list | First sequence to join |
param | other | Second sequence to join |
param | zipper | Join function |
returns | Joined sequence |
method Seq<(T Left, U Right)> zip <T, U> (Seq<T> list, Seq<U> other) Source #
Joins two sequences together either into an sequence of tuples
param | list | First sequence to join |
param | other | Second sequence to join |
param | zipper | Join function |
returns | Joined sequence of tuples |
method int length <T> (Seq<T> list) Source #
Returns the number of items in the sequence
type | T | sequence item type |
param | list | sequence to count |
returns | The number of items in the sequence |
method Unit iter <T> (Seq<T> list, Action<T> action) Source #
Invokes an action for each item in the sequence in order
type | T | sequence item type |
param | list | sequence to iterate |
param | action | Action to invoke with each item |
returns | Unit |
method Unit iter <T> (Seq<T> list, Action<int, T> action) Source #
Invokes an action for each item in the sequence in order and supplies a running index value.
type | T | sequence item type |
param | list | sequence to iterate |
param | action | Action to invoke with each item |
returns | Unit |
method bool forall <T> (Seq<T> list, Func<T, bool> pred) Source #
Returns true if all items in the sequence match a predicate (Any in LINQ)
type | T | sequence item type |
param | list | sequence to test |
param | pred | Predicate |
returns | True if all items in the sequence match the predicate |
method Seq<T> distinct <T> (Seq<T> list) Source #
Return a new sequence with all duplicate values removed
type | T | sequence item type |
param | list | sequence |
returns | A new sequence with all duplicate values removed |
method Seq<T> distinct <EQ, T> (Seq<T> list) Source #
Return a new sequence with all duplicate values removed
type | T | sequence item type |
param | list | sequence |
returns | A new sequence with all duplicate values removed |
method Seq<T> distinct <T, K> (Seq<T> list, Func<T, K> keySelector, Option<Func<K, K, bool>> compare = default(Option<Func<K, K, bool>>)) Source #
Return a new sequence with all duplicate values removed
type | T | sequence item type |
param | list | sequence |
returns | A new sequence with all duplicate values removed |
method Seq<T> take <T> (Seq<T> list, int count) Source #
Returns a new sequence with the first 'count' items from the sequence provided
type | T | sequence item type |
param | list | sequence |
param | count | Number of items to take |
returns | A new sequence with the first 'count' items from the sequence provided |
method Seq<T> takeWhile <T> (Seq<T> list, Func<T, bool> pred) Source #
Iterate the sequence, yielding items if they match the predicate provided, and stopping as soon as one doesn't
type | T | sequence item type |
param | list | sequence |
param | count | Number of items to take |
returns | A new sequence with the first items that match the predicate |
method Seq<T> takeWhile <T> (Seq<T> list, Func<T, int, bool> pred) Source #
Iterate the sequence, 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 | sequence item type |
param | list | sequence |
param | count | Number of items to take |
returns | A new sequence with the first items that match the predicate |
method bool exists <T> (Seq<T> list, Func<T, bool> pred) Source #
Returns true if any item in the sequence matches the predicate provided
type | T | sequence item type |
param | list | sequence to test |
param | pred | Predicate |
returns | True if any item in the sequence matches the predicate provided |
method Seq<B> apply <A, B> (Seq<Func<A, B>> fabc, Seq<A> fa) Source #
Apply a sequence of values to a sequence of functions
param | fabc | sequence of functions |
param | fa | sequence of argument values |
returns | Returns the result of applying the sequence argument values to the sequence functions |
method Seq<B> apply <A, B> (Func<A, B> fabc, Seq<A> fa) Source #
Apply a sequence of values to a sequence of functions
param | fabc | sequence of functions |
param | fa | sequence of argument values |
returns | Returns the result of applying the sequence argument values to the sequence functions |
method Seq<Func<B, C>> apply <A, B, C> (Seq<Func<A, B, C>> fabc, Seq<A> fa) Source #
Apply a sequence of values to a sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
returns | Returns the result of applying the sequence of argument values to the IEnumerable of functions: a sequence of functions of arity 1 |
method Seq<Func<B, C>> apply <A, B, C> (Func<A, B, C> fabc, Seq<A> fa) Source #
Apply a sequence of values to a sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
returns | Returns the result of applying the sequence of argument values to the sequence of functions: a sequence of functions of arity 1 |
method Seq<C> apply <A, B, C> (Seq<Func<A, B, C>> fabc, Seq<A> fa, Seq<B> fb) Source #
Apply sequence of values to a sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
param | fb | sequence argument values |
returns | Returns the result of applying the sequence of arguments to the sequence of functions |
method Seq<C> apply <A, B, C> (Func<A, B, C> fabc, Seq<A> fa, Seq<B> fb) Source #
Apply sequence of values to an sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
param | fb | sequence argument values |
returns | Returns the result of applying the sequence of arguments to the sequence of functions |
method Seq<Func<B, C>> apply <A, B, C> (Seq<Func<A, Func<B, C>>> fabc, Seq<A> fa) Source #
Apply a sequence of values to a sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
returns | Returns the result of applying the sequence of argument values to the sequence of functions: a sequence of functions of arity 1 |
method Seq<Func<B, C>> apply <A, B, C> (Func<A, Func<B, C>> fabc, Seq<A> fa) Source #
Apply an sequence of values to an sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
returns | Returns the result of applying the sequence of argument values to the sequence of functions: a sequence of functions of arity 1 |
method Seq<C> apply <A, B, C> (Seq<Func<A, Func<B, C>>> fabc, Seq<A> fa, Seq<B> fb) Source #
Apply sequence of values to an sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
param | fb | sequence argument values |
returns | Returns the result of applying the sequence of arguments to the sequence of functions |
method Seq<C> apply <A, B, C> (Func<A, Func<B, C>> fabc, Seq<A> fa, Seq<B> fb) Source #
Apply sequence of values to a sequence of functions of arity 2
param | fabc | sequence of functions |
param | fa | sequence argument values |
param | fb | sequence argument values |
returns | Returns the result of applying the sequence of arguments to the sequence of functions |
method Seq<B> action <A, B> (Seq<A> fa, Seq<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 Seq<Seq<A>> tails <A> (Seq<A> self) Source #
The tails function returns all final segments of the argument, longest first. For example:
tails(['a','b','c']) == [['a','b','c'], ['b','c'], ['c'],[]]
type | A | Seq item type |
param | self | Seq |
returns | Seq of Seq of A |
method Seq<Seq<A>> tailsr <A> (Seq<A> self) Source #
The tailsr function returns all final segments of the argument, longest first. For example:
tails(['a','b','c']) == [['a','b','c'], ['b','c'], ['c'],[]]
Differs from tails
in implementation only. The tailsr
uses recursive processing
whereas tails
uses a while loop aggregation followed by a reverse. For small sequences
tailsr
is probably more efficient.
type | A | Seq item type |
param | self | Seq |
returns | Seq of Seq of A |
method (Seq<T>, Seq<T>) span <T> (Seq<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 |
Seq.span(Seq(1,2,3,4,1,2,3,4), x => x < 3) == (Seq(1,2), Seq(3,4,1,2,3,4))
Seq.span(Seq(1,2,3), x => x < 9) == (Seq(1,2,3), Seq())
Seq.span(Seq(1,2,3), x => x < 0) == (Seq(), Seq(1,2,3))
A unit type that represents Seq.Empty
. This type can be implicitly
converted to Seq<A>
.
field SeqEmpty Default = new SeqEmpty() Source #
Represents a sequence on loan from an ArrayPool
This supports rapid reading of data for use in streaming situations. As soon as any transformations are made the backing data is baked into a Seq of A. This involves cloning the original array (because obviously the rented array will be returned to the pool eventually).
You can manually call Dispose() to release the Array, however it also supports a finaliser to return the backing array back to its pool of origin.
NOTE: If you call Dispose() whilst using this structure on another thread, behaviour is undefined.
type | A | Bound value |
Head item in the sequence. NOTE: If IsEmpty
is true then Head
is undefined. Call HeadOrNone() if for maximum safety.
method ReadOnlySpan<A> ToReadOnlySpan () Source #
method S Fold <S> (S state, Func<S, A, S> f) Source #
Fold the sequence from the first item to the last
type | S | State type |
param | state | Initial state |
param | f | Fold function |
returns | Aggregated state |
method S FoldBack <S> (S state, Func<S, A, S> f) Source #
Fold the sequence from the last item to the first. For sequences that are not lazy and are less than 5000 items long, FoldBackRec is called instead, because it is faster.
type | S | State type |
param | state | Initial state |
param | f | Fold function |
returns | Aggregated state |
method Enumerator GetEnumerator () Source #
method int GetHashCode () Source #