- Arr <A>
- Empty
- Arr (IEnumerable<A> initial)
- Arr (ReadOnlySpan<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 valueToAdd)
- 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 valueToInsert)
- InsertRange (int index, IEnumerable<A> items)
- Remove (A valueToRemove)
- Remove (A valueToRemove, IEqualityComparer<A> equalityComparer)
- Remove <EQ> (A valueToRemove)
- RemoveAll (Predicate<A> pred)
- RemoveAt (int index)
- RemoveRange (int index, int count)
- SetItem (int index, A valueToSet)
- AsEnumerable ()
- ToSeq ()
- ToString ()
- ToFullString (string separator = ", ")
- ToFullArrayString (string separator = ", ")
- Skip (int amount)
- Reverse ()
- Do (Action<A> f)
- Map <B> (Func<A, B> map)
- Traverse <F, B> (Func<A, K<F, B>> f)
- Filter (Func<A, bool> pred)
- + (Arr<A> lhs, A rhs)
- + (A lhs, Arr<A> rhs)
- + (Arr<A> lhs, Arr<A> rhs)
- Combine (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)
- > (Arr<A> left, Arr<A> right)
- >= (Arr<A> left, Arr<A> right)
- < (Arr<A> left, Arr<A> right)
- <= (Arr<A> left, Arr<A> right)
- AdditiveIdentity
- Enumerator
- ArrExtensions
- As <A> (this K<Arr, A> xs)
- Flatten <A> (this A[][] ma)
- Flatten <A> (this Arr<Arr<A>> ma)
- 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)
- AsQueryable <A> (this Arr<A> source)
- Arr
- empty <T> ()
- create <T> ()
- singleton <A> (A value)
- create <T> (ReadOnlySpan<T> items)
- 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)
- Arr
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 |
property Lens<Arr<A>, Option<A>> headOrNone Source #
Head or none lens
property Lens<Arr<A>, Option<A>> lastOrNone Source #
Last or none lens
property object? Case Source #
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) => ...,
_ => ...
}
property Arr<A> AdditiveIdentity Source #
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 valueToRemove, 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 EnumerableM<A> AsEnumerable () Source #
method string ToString () Source #
Format the collection as [a, b, c, ...]
The ellipsis 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 K<F, Arr<B>> Traverse <F, B> (Func<A, K<F, B>> f) Source #
Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.
type | F | Applicative functor trait |
type | B | Bound value (output) |
param | f | |
param | ta | Traversable 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 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 IQueryable<A> AsQueryable <A> (this Arr<A> source) Source #
Convert to a queryable
method Arr<A> singleton <A> (A value) Source #
Create a singleton array
param | value | Single value |
returns | Collection with a single item in it |
method Arr<T> create <T> (ReadOnlySpan<T> items) Source #
Create an array from a initial set of items
param | items | Items |
returns | Lst T |
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 |