System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="6.0.0-preview.3.21201.4" />

.NET API 193,408 bytes

 IImmutableList<T>

Represents a list of elements that cannot be modified. NuGet package: System.Collections.Immutable (about immutable collections and how to install)
IImmutableList<T> Add(T value)

Makes a copy of the list, and adds the specified object to the end of the copied list.

Makes a copy of the list and adds the specified objects to the end of the copied list.

Creates a list with all the items removed, but with the same sorting and ordering semantics as this list.

int IndexOf(T item, int index, int count, IEqualityComparer<T> equalityComparer)

Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the IImmutableList<T> that starts at the specified index and contains the specified number of elements.

IImmutableList<T> Insert(int index, T element)

Inserts the specified element at the specified index in the immutable list.

IImmutableList<T> InsertRange(int index, IEnumerable<T> items)

Inserts the specified elements at the specified index in the immutable list.

int LastIndexOf(T item, int index, int count, IEqualityComparer<T> equalityComparer)

Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the IImmutableList<T> that contains the specified number of elements and ends at the specified index.

IImmutableList<T> Remove(T value, IEqualityComparer<T> equalityComparer)

Removes the first occurrence of a specified object from this immutable list.

Removes all the elements that match the conditions defined by the specified predicate.

IImmutableList<T> RemoveAt(int index)

Removes the element at the specified index of the immutable list.

IImmutableList<T> RemoveRange(IEnumerable<T> items, IEqualityComparer<T> equalityComparer)

Removes the specified object from the list.

IImmutableList<T> RemoveRange(int index, int count)

Removes a range of elements from the IImmutableList<T>.

IImmutableList<T> Replace(T oldValue, T newValue, IEqualityComparer<T> equalityComparer)

Returns a new list with the first matching element in the list replaced with the specified element.

IImmutableList<T> SetItem(int index, T value)

Replaces an element in the list at a given position with the specified element.