- Arr <A>
- Empty = new Arr<A>(new A[0] { })
- Arr (IEnumerable<A> initial)
- head
- headOrNone
- last
- lastOrNone
- item (int index)
- itemOrNone (int index)
- map <B> (Lens<A, B> lens)
- this []
- Case
- IsEmpty
- Count
- Length
- Add (A value)
- AddRange (IEnumerable<A> items)
- Clear ()
- GetEnumerator ()
- IndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null)
- LastIndexOf (A item, int index = -1, int count = -1, IEqualityComparer<A> equalityComparer = null)
- IndexOf <EQ> (A item, int index = 0, int count = -1)
- LastIndexOf <EQ> (A item, int index = -1, int count = -1)
- Insert (int index, A value)
- InsertRange (int index, IEnumerable<A> items)
- Remove (A value)
- Remove (A value, IEqualityComparer<A> equalityComparer)
- Remove <EQ> (A value)
- RemoveAll (Predicate<A> pred)
- RemoveAt (int index)
- RemoveRange (int index, int count)
- SetItem (int index, A value)
- AsEnumerable ()
- ToSeq ()
- ToString ()
- ToFullString (string separator = ", ")
- ToFullArrayString (string separator = ", ")
- Skip (int amount)
- Reverse ()
- Fold <S> (S state, Func<S, A, S> folder)
- Do (Action<A> f)
- Map <B> (Func<A, B> map)
- Filter (Func<A, bool> pred)
- + (Arr<A> lhs, A rhs)
- + (A lhs, Arr<A> rhs)
- + (Arr<A> lhs, Arr<A> rhs)
- Append (Arr<A> rhs)
- Equals (object obj)
- GetHashCode ()
- CompareTo (object obj)
- Equals (Arr<A> other)
- CompareTo (Arr<A> other)
- == (Arr<A> lhs, Arr<A> rhs)
- != (Arr<A> lhs, Arr<A> rhs)
- Bind <B> (Func<A, Arr<B>> f)
- Enumerator
- ArrExtensions
- Flatten <A> (this A[][] ma)
- Flatten <A> (this Arr<Arr<A>> ma)
- Aggregate <TSource, TAccumulate> (this Arr<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func)
- Aggregate <TSource, TAccumulate, TResult> (this Arr<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, Func<TAccumulate, TResult> resultSelector)
- Aggregate <TSource> (this Arr<TSource> source, Func<TSource, TSource, TSource> func)
- All <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- Any <TSource> (this Arr<TSource> source)
- Any <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- AsEnumerable <TSource> (this Arr<TSource> source)
- AsQueryable <TElement> (this Arr<TElement> source)
- Average (this Arr<decimal> source)
- Average <TSource> (this Arr<TSource> source, Func<TSource, decimal> selector)
- Average (this Arr<decimal?> source)
- Average <TSource> (this Arr<TSource> source, Func<TSource, decimal?> selector)
- Average (this Arr<double> source)
- Average (this Arr<int> source)
- Average (this Arr<long> source)
- Average <TSource> (this Arr<TSource> source, Func<TSource, double> selector)
- Average <TSource> (this Arr<TSource> source, Func<TSource, int> selector)
- Average <TSource> (this Arr<TSource> source, Func<TSource, long> selector)
- Average (this Arr<double?> source)
- Average (this Arr<int?> source)
- Average (this Arr<long?> source)
- Average <TSource> (this Arr<TSource> source, Func<TSource, double?> selector)
- Average <TSource> (this Arr<TSource> source, Func<TSource, int?> selector)
- Average <TSource> (this Arr<TSource> source, Func<TSource, long?> selector)
- Average (this Arr<float> source)
- Average <TSource> (this Arr<TSource> source, Func<TSource, float> selector)
- Average (this Arr<float?> source)
- Average <TSource> (this Arr<TSource> source, Func<TSource, float?> selector)
- Concat <TSource> (this Arr<TSource> first, IEnumerable<TSource> second)
- Contains <TSource> (this Arr<TSource> source, TSource value)
- Contains <TSource> (this Arr<TSource> source, TSource value, IEqualityComparer<TSource> comparer)
- Count <TSource> (this Arr<TSource> source)
- Count <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- DefaultIfEmpty <TSource> (this Arr<TSource> source)
- DefaultIfEmpty <TSource> (this Arr<TSource> source, TSource defaultValue)
- Distinct <TSource> (this Arr<TSource> source)
- Distinct <TSource> (this Arr<TSource> source, IEqualityComparer<TSource> comparer)
- ElementAt <TSource> (this Arr<TSource> source, int index)
- ElementAtOrDefault <TSource> (this Arr<TSource> source, int index)
- Except <TSource> (this Arr<TSource> first, IEnumerable<TSource> second)
- Except <TSource> (this Arr<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- First <TSource> (this Arr<TSource> source)
- First <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- FirstOrDefault <TSource> (this Arr<TSource> source)
- FirstOrDefault <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- GroupBy <TSource, TKey, TElement> (this Arr<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
- GroupBy <TSource, TKey, TElement> (this Arr<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
- GroupBy <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector)
- GroupBy <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
- GroupBy <TSource, TKey, TElement, TResult> (this Arr<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector)
- GroupBy <TSource, TKey, TElement, TResult> (this Arr<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey> comparer)
- GroupBy <TSource, TKey, TResult> (this Arr<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector)
- GroupBy <TSource, TKey, TResult> (this Arr<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey> comparer)
- GroupJoin <TOuter, TInner, TKey, TResult> (this Arr<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 Arr<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 Arr<TSource> first, IEnumerable<TSource> second)
- Intersect <TSource> (this Arr<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- Join <TOuter, TInner, TKey, TResult> (this Arr<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector)
- Join <TOuter, TInner, TKey, TResult> (this Arr<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey> comparer)
- Last <TSource> (this Arr<TSource> source)
- Last <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- LastOrDefault <TSource> (this Arr<TSource> source)
- LastOrDefault <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- LongCount <TSource> (this Arr<TSource> source)
- LongCount <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- Max (this Arr<decimal> source)
- Max <TSource> (this Arr<TSource> source, Func<TSource, decimal> selector)
- Max (this Arr<decimal?> source)
- Max <TSource> (this Arr<TSource> source, Func<TSource, decimal?> selector)
- Max (this Arr<double> source)
- Max <TSource> (this Arr<TSource> source, Func<TSource, double> selector)
- Max (this Arr<double?> source)
- Max <TSource> (this Arr<TSource> source, Func<TSource, double?> selector)
- Max (this Arr<float> source)
- Max <TSource> (this Arr<TSource> source, Func<TSource, float> selector)
- Max (this Arr<float?> source)
- Max <TSource> (this Arr<TSource> source, Func<TSource, float?> selector)
- Max (this Arr<int> source)
- Max <TSource> (this Arr<TSource> source, Func<TSource, int> selector)
- Max (this Arr<int?> source)
- Max <TSource> (this Arr<TSource> source, Func<TSource, int?> selector)
- Max (this Arr<long> source)
- Max <TSource> (this Arr<TSource> source, Func<TSource, long> selector)
- Max (this Arr<long?> source)
- Max <TSource> (this Arr<TSource> source, Func<TSource, long?> selector)
- Max <TSource, TResult> (this Arr<TSource> source, Func<TSource, TResult> selector)
- Max <TSource> (this Arr<TSource> source)
- Min (this Arr<decimal> source)
- Min <TSource> (this Arr<TSource> source, Func<TSource, decimal> selector)
- Min (this Arr<decimal?> source)
- Min <TSource> (this Arr<TSource> source, Func<TSource, decimal?> selector)
- Min (this Arr<double> source)
- Min <TSource> (this Arr<TSource> source, Func<TSource, double> selector)
- Min (this Arr<double?> source)
- Min <TSource> (this Arr<TSource> source, Func<TSource, double?> selector)
- Min (this Arr<float> source)
- Min <TSource> (this Arr<TSource> source, Func<TSource, float> selector)
- Min (this Arr<float?> source)
- Min <TSource> (this Arr<TSource> source, Func<TSource, float?> selector)
- Min (this Arr<int> source)
- Min <TSource> (this Arr<TSource> source, Func<TSource, int> selector)
- Min (this Arr<int?> source)
- Min <TSource> (this Arr<TSource> source, Func<TSource, int?> selector)
- Min (this Arr<long> source)
- Min <TSource> (this Arr<TSource> source, Func<TSource, long> selector)
- Min (this Arr<long?> source)
- Min <TSource> (this Arr<TSource> source, Func<TSource, long?> selector)
- Min <TSource, TResult> (this Arr<TSource> source, Func<TSource, TResult> selector)
- Min <TSource> (this Arr<TSource> source)
- OrderBy <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector)
- OrderBy <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)
- OrderByDescending <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector)
- OrderByDescending <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)
- Reverse <TSource> (this Arr<TSource> source)
- SequenceEqual <TSource> (this Arr<TSource> first, IEnumerable<TSource> second)
- SequenceEqual <TSource> (this Arr<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- Single <TSource> (this Arr<TSource> source)
- Single <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- SingleOrDefault <TSource> (this Arr<TSource> source)
- SingleOrDefault <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- Skip <TSource> (this Arr<TSource> source, int count)
- SkipWhile <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- SkipWhile <TSource> (this Arr<TSource> source, Func<TSource, int, bool> predicate)
- Sum (this Arr<decimal> source)
- Sum <TSource> (this Arr<TSource> source, Func<TSource, decimal> selector)
- Sum (this Arr<decimal?> source)
- Sum <TSource> (this Arr<TSource> source, Func<TSource, decimal?> selector)
- Sum (this Arr<double> source)
- Sum <TSource> (this Arr<TSource> source, Func<TSource, double> selector)
- Sum (this Arr<double?> source)
- Sum <TSource> (this Arr<TSource> source, Func<TSource, double?> selector)
- Sum (this Arr<float> source)
- Sum <TSource> (this Arr<TSource> source, Func<TSource, float> selector)
- Sum (this Arr<float?> source)
- Sum <TSource> (this Arr<TSource> source, Func<TSource, float?> selector)
- Sum (this Arr<int> source)
- Sum <TSource> (this Arr<TSource> source, Func<TSource, int> selector)
- Sum (this Arr<int?> source)
- Sum <TSource> (this Arr<TSource> source, Func<TSource, int?> selector)
- Sum (this Arr<long> source)
- Sum <TSource> (this Arr<TSource> source, Func<TSource, long> selector)
- Sum (this Arr<long?> source)
- Sum <TSource> (this Arr<TSource> source, Func<TSource, long?> selector)
- Take <TSource> (this Arr<TSource> source, int count)
- TakeWhile <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate)
- TakeWhile <TSource> (this Arr<TSource> source, Func<TSource, int, bool> predicate)
- ToArray <TSource> (this Arr<TSource> source)
- ToDictionary <TSource, TKey, TElement> (this Arr<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
- ToDictionary <TSource, TKey, TElement> (this Arr<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
- ToDictionary <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector)
- ToDictionary <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
- ToList <TSource> (this Arr<TSource> source)
- ToLookup <TSource, TKey, TElement> (this Arr<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
- ToLookup <TSource, TKey, TElement> (this Arr<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
- ToLookup <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector)
- ToLookup <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
- Union <TSource> (this Arr<TSource> first, IEnumerable<TSource> second)
- Union <TSource> (this Arr<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
- Zip <TFirst, TSecond, TResult> (this Arr<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)
- Filter <A> (this Arr<A> ma, Func<A, bool> f)
- Where <A> (this Arr<A> ma, Func<A, bool> f)
- Map <A, B> (this Arr<A> ma, Func<A, B> f)
- Select <A, B> (this Arr<A> ma, Func<A, B> f)
- Bind <A, B> (this Arr<A> ma, Func<A, Arr<B>> f)
- SelectMany <A, B> (this Arr<A> ma, Func<A, Arr<B>> f)
- SelectMany <A, B, C> (this Arr<A> ma, Func<A, Arr<B>> bind, Func<A, B, C> project)
- Arr
- empty <T> ()
- create <T> ()
- create <T> (params T[] items)
- createRange <T> (IEnumerable<T> items)
- add <T> (Arr<T> array, T value)
- addRange <T> (Arr<T> array, IEnumerable<T> value)
- remove <T> (Arr<T> array, T value)
- removeAt <T> (Arr<T> array, int index)
- rev <T> (T[] array)
- rev <T> (Arr<T> array)
- flatten <A> (A[][] ma)
- flatten <A> (Arr<Arr<A>> ma)
Immutable array Native array O(1) read performance. Modifications require copying of the entire array to generate the newly mutated version. This is will be very expensive for large arrays.
type | A | Value type |
field Arr<A> Empty = new Arr<A>(new A[0] { }) Source #
Empty array
property Lens<Arr<A>, Option<A>> headOrNone Source #
Head or none lens
property Lens<Arr<A>, Option<A>> lastOrNone Source #
Last or none lens
Reference version for use in pattern-matching
Empty collection = result is null
Singleton collection = result is A
More = result is (A, Seq<A>) -- head and tail
Example:
var res = arr.Case switch
{
A value => ...,
(var x, var xs) => ...,
_ => ...
}
method Lens<Arr<A>, Option<A>> itemOrNone (int index) Source #
Item or none at index lens
method Enumerator GetEnumerator () Source #
Get enumerator
method int IndexOf (A item, int index = 0, int count = -1, IEqualityComparer<A> equalityComparer = null) Source #
Find the index of an item
method int LastIndexOf (A item, int index = -1, int count = -1, IEqualityComparer<A> equalityComparer = null) Source #
Find the index of an item
method int IndexOf <EQ> (A item, int index = 0, int count = -1) Source #
Find the index of an item
method int LastIndexOf <EQ> (A item, int index = -1, int count = -1) Source #
Find the index of an item
method Arr<A> InsertRange (int index, IEnumerable<A> items) Source #
Insert range of values at specified index
method Arr<A> Remove (A value, IEqualityComparer<A> equalityComparer) Source #
Remove an item from the array
method Arr<A> RemoveRange (int index, int count) Source #
Remove a range of items
method IEnumerable<A> AsEnumerable () Source #
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 Arr<A> Do (Action<A> f) Source #
Impure iteration of the bound values in the structure
returns | Returns the original unmodified structure |
method int GetHashCode () Source #
Get the hash code Lazily (and once only) calculates the hash from the elements in the array Empty array hash == 0
class ArrExtensions Source #
method TAccumulate Aggregate <TSource, TAccumulate> (this Arr<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 Arr<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 Arr<TSource> source, Func<TSource, TSource, TSource> func) Source #
Applies an accumulator function over a sequence.
method bool All <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate) Source #
Determines whether all elements of a sequence satisfy a condition.
method bool Any <TSource> (this Arr<TSource> source) Source #
Determines whether a sequence contains any elements.
method bool Any <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate) Source #
Determines whether any element of a sequence satisfies a condition.
method IEnumerable<TSource> AsEnumerable <TSource> (this Arr<TSource> source) Source #
Returns the input typed as IEnumerable
method IQueryable<TElement> AsQueryable <TElement> (this Arr<TElement> source) Source #
Converts a generic IEnumerable
method decimal Average (this Arr<decimal> source) Source #
Computes the average of a sequence of Decimal values.
method decimal Average <TSource> (this Arr<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 Arr<decimal?> source) Source #
Computes the average of a sequence of nullable Decimal values.
method decimal? Average <TSource> (this Arr<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 Arr<double> source) Source #
Computes the average of a sequence of Double values.
method double Average (this Arr<int> source) Source #
Computes the average of a sequence of Int32 values.
method double Average (this Arr<long> source) Source #
Computes the average of a sequence of Int64 values.
method double Average <TSource> (this Arr<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 Arr<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 Arr<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 Arr<double?> source) Source #
Computes the average of a sequence of nullable Double values.
method double? Average (this Arr<int?> source) Source #
Computes the average of a sequence of nullable Int32 values.
method double? Average (this Arr<long?> source) Source #
Computes the average of a sequence of nullable Int64 values.
method double? Average <TSource> (this Arr<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 Arr<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 Arr<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 Arr<float> source) Source #
Computes the average of a sequence of Single values.
method float Average <TSource> (this Arr<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 Arr<float?> source) Source #
Computes the average of a sequence of nullable Single values.
method float? Average <TSource> (this Arr<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 Arr<TSource> first, IEnumerable<TSource> second) Source #
Concatenates two sequences.
method bool Contains <TSource> (this Arr<TSource> source, TSource value) Source #
Determines whether a sequence contains a specified element by using the default equality comparer.
method bool Contains <TSource> (this Arr<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 Arr<TSource> source) Source #
Returns the number of elements in a sequence.
method int Count <TSource> (this Arr<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 Arr<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 Arr<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 Arr<TSource> source) Source #
Returns distinct elements from a sequence by using the default equality comparer to compare values.
method IEnumerable<TSource> Distinct <TSource> (this Arr<TSource> source, IEqualityComparer<TSource> comparer) Source #
Returns distinct elements from a sequence by using a specified IEqualityComparer
method TSource ElementAt <TSource> (this Arr<TSource> source, int index) Source #
Returns the element at a specified index in a sequence.
method TSource ElementAtOrDefault <TSource> (this Arr<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 Arr<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 Arr<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 Arr<TSource> source) Source #
Returns the first element of a sequence.
method TSource First <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate) Source #
Returns the first element in a sequence that satisfies a specified condition.
method TSource FirstOrDefault <TSource> (this Arr<TSource> source) Source #
Returns the first element of a sequence, or a default value if the sequence contains no elements.
method TSource FirstOrDefault <TSource> (this Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<TSource> source) Source #
Returns the last element of a sequence.
method TSource Last <TSource> (this Arr<TSource> source, Func<TSource, bool> predicate) Source #
Returns the last element of a sequence that satisfies a specified condition.
method TSource LastOrDefault <TSource> (this Arr<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 Arr<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 Arr<TSource> source) Source #
Returns an Int64 that represents the total number of elements in a sequence.
method long LongCount <TSource> (this Arr<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 Arr<decimal> source) Source #
Returns the maximum value in a sequence of Decimal values.
method decimal Max <TSource> (this Arr<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 Arr<decimal?> source) Source #
Returns the maximum value in a sequence of nullable Decimal values.
method decimal? Max <TSource> (this Arr<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 Arr<double> source) Source #
Returns the maximum value in a sequence of Double values.
method double Max <TSource> (this Arr<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 Arr<double?> source) Source #
Returns the maximum value in a sequence of nullable Double values.
method double? Max <TSource> (this Arr<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 Arr<float> source) Source #
Returns the maximum value in a sequence of Single values.
method float Max <TSource> (this Arr<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 Arr<float?> source) Source #
Returns the maximum value in a sequence of nullable Single values.
method float? Max <TSource> (this Arr<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 Arr<int> source) Source #
Returns the maximum value in a sequence of Int32 values.
method int Max <TSource> (this Arr<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 Arr<int?> source) Source #
Returns the maximum value in a sequence of nullable Int32 values.
method int? Max <TSource> (this Arr<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 Arr<long> source) Source #
Returns the maximum value in a sequence of Int64 values.
method long Max <TSource> (this Arr<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 Arr<long?> source) Source #
Returns the maximum value in a sequence of nullable Int64 values.
method long? Max <TSource> (this Arr<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 Arr<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 Arr<TSource> source) Source #
Returns the maximum value in a generic sequence.
method decimal Min (this Arr<decimal> source) Source #
Returns the minimum value in a sequence of Decimal values.
method decimal Min <TSource> (this Arr<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 Arr<decimal?> source) Source #
Returns the minimum value in a sequence of nullable Decimal values.
method decimal? Min <TSource> (this Arr<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 Arr<double> source) Source #
Returns the minimum value in a sequence of Double values.
method double Min <TSource> (this Arr<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 Arr<double?> source) Source #
Returns the minimum value in a sequence of nullable Double values.
method double? Min <TSource> (this Arr<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 Arr<float> source) Source #
Returns the minimum value in a sequence of Single values.
method float Min <TSource> (this Arr<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 Arr<float?> source) Source #
Returns the minimum value in a sequence of nullable Single values.
method float? Min <TSource> (this Arr<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 Arr<int> source) Source #
Returns the minimum value in a sequence of Int32 values.
method int Min <TSource> (this Arr<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 Arr<int?> source) Source #
Returns the minimum value in a sequence of nullable Int32 values.
method int? Min <TSource> (this Arr<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 Arr<long> source) Source #
Returns the minimum value in a sequence of Int64 values.
method long Min <TSource> (this Arr<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 Arr<long?> source) Source #
Returns the minimum value in a sequence of nullable Int64 values.
method long? Min <TSource> (this Arr<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 Arr<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 Arr<TSource> source) Source #
Returns the minimum value in a generic sequence.
method IOrderedEnumerable<TSource> OrderBy <TSource, TKey> (this Arr<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 Arr<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 Arr<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 Arr<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 Arr<TSource> source) Source #
Inverts the order of the elements in a sequence.
method bool SequenceEqual <TSource> (this Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<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 Arr<TSource> source, Func<TSource, int, bool> predicate) Source #
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function.
method decimal Sum (this Arr<decimal> source) Source #
Computes the sum of a sequence of Decimal values.
method decimal Sum <TSource> (this Arr<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 Arr<decimal?> source) Source #
Computes the sum of a sequence of nullable Decimal values.
method decimal? Sum <TSource> (this Arr<TSource> source, Func<TSource, decimal?> selector) Source #
Computes the sum of the sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence.
method double Sum (this Arr<double> source) Source #
Computes the sum of a sequence of Double values.
method double Sum <TSource> (this Arr<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 Arr<double?> source) Source #
Computes the sum of a sequence of nullable Double values.
method double? Sum <TSource> (this Arr<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 Arr<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 Arr<float?> source) Source #
Computes the sum of a sequence of nullable Single values.
method float? Sum <TSource> (this Arr<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 Arr<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 Arr<int?> source) Source #
Computes the sum of a sequence of nullable Int32 values.
method int? Sum <TSource> (this Arr<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 Arr<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 Arr<long?> source) Source #
Computes the sum of a sequence of nullable Int64 values.
method long? Sum <TSource> (this Arr<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 Arr<TSource> source, int count) Source #
Returns a specified number of contiguous elements from the start of a sequence.
method IEnumerable<TSource> TakeWhile <TSource> (this Arr<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 Arr<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 Arr<TSource> source) Source #
Creates an array from a IEnumerable
method Dictionary<TKey, TElement> ToDictionary <TSource, TKey, TElement> (this Arr<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 Arr<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 Arr<TSource> source, Func<TSource, TKey> keySelector) Source #
Creates a Dictionary<TKey,TValue> from an IEnumerable
method Dictionary<TKey, TSource> ToDictionary <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer) Source #
Creates a Dictionary<TKey,TValue> from an IEnumerable
method List<TSource> ToList <TSource> (this Arr<TSource> source) Source #
Creates a List
method ILookup<TKey, TElement> ToLookup <TSource, TKey, TElement> (this Arr<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 Arr<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 Arr<TSource> source, Func<TSource, TKey> keySelector) Source #
Creates a Lookup<TKey,TElement> from an IEnumerable
method ILookup<TKey, TSource> ToLookup <TSource, TKey> (this Arr<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer) Source #
Creates a Lookup<TKey,TElement> from an IEnumerable
method IEnumerable<TSource> Union <TSource> (this Arr<TSource> first, IEnumerable<TSource> second) Source #
Produces the set union of two sequences by using the default equality comparer.
method IEnumerable<TSource> Union <TSource> (this Arr<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer) Source #
Produces the set union of two sequences by using a specified IEqualityComparer
method IEnumerable<TResult> Zip <TFirst, TSecond, TResult> (this Arr<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector) Source #
Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results.
method Arr<B> SelectMany <A, B> (this Arr<A> ma, Func<A, Arr<B>> f) Source #
method Arr<C> SelectMany <A, B, C> (this Arr<A> ma, Func<A, Arr<B>> bind, Func<A, B, C> project) Source #
method Arr<T> create <T> (params T[] items) Source #
Create an array from a initial set of items
param | items | Items |
returns | Lst T |
method Arr<T> createRange <T> (IEnumerable<T> items) Source #
Create an array from an initial set of items
param | items | Items |
returns | Lst T |
method Arr<T> add <T> (Arr<T> array, T value) Source #
Add an item to the array
param | array | Array |
param | value | Item to add |
returns | A new Lst T |
method Arr<T> addRange <T> (Arr<T> array, IEnumerable<T> value) Source #
Add a range of items to the array
param | array | Array |
param | value | Items to add |
returns | A new Lst T |
method Arr<T> remove <T> (Arr<T> array, T value) Source #
Remove an item from the array
param | array | Array |
param | value | value to remove |
returns | A new Lst T |
method Arr<T> removeAt <T> (Arr<T> array, int index) Source #
Remove an item at a specified index in the array
param | array | Array |
param | index | Index of item to remove |
returns | A new Lst T |
method T[] rev <T> (T[] array) Source #
Reverses the array (Reverse in LINQ)
type | T | Array item type |
param | array | Array to reverse |
returns | Reversed list |