# list · Rell standard library · Chromia Docs (concept)

> type list<T>: collection <T> Represents a mutable array list. Subtype of collection<T> . See Also collection - Rell Standard Library Since 0.6.0 Methods _s

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/

TYPE

# list

```signature
type list<T>: collection<T>
```

Represents a mutable array list. Subtype of `collection<T>`.

**See Also**

1. [`collection` - Rell Standard Library](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/collection/)

Since 0.6.0

## Methods

[\_set](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/_set/)
:   Set the element at the specified index, overwriting the element that was previously at that index.

[\_sort](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/_sort/)
:   Sort this list in place.

[add](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/add/)
:   Insert a value at the specified index. Any elements previously occurring at and after the specified

[addAll](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/add-all/)
:   Insert all elements from a collection at the specified index. Any elements previously occurring at

[add\_all](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/add_all/)
:   Insert all elements from a collection at the specified index. Any elements previously occurring at

[add\_all\_copy](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/add_all_copy/)
:   Returns a new list that is the concatenation of the elements of this list with those of the given

[clear](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/clear/)
:   Clear this collection; i.e. remove all its elements. Immediately after this method returns, this

[contains](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/contains/)
:   Check if this collection contains the given element.

[containsAll](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/contains-all/)
:   Check if this collection contains all elements of another collection.

[contains\_all](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/contains_all/)
:   Check if this collection contains all elements of another collection.

[empty](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/empty/)
:   Check if this collection is empty.

[get](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/get/)
:   Retrieve the element at the specified index.

[indexOf](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/index-of/)
:   Search for the first occurrence of the specified element within this list.

[index\_of](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/index_of/)
:   Search for the first occurrence of the specified element within this list.

[join\_to\_text](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/join_to_text/)
:   Generate a textual representation of this iterable.

[len](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/len/)
:   Get the size (number of elements) of this collection.

[list](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/list/)

[remove](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/remove/)
:   Remove an element from this collection.

[removeAll](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/remove-all/)
:   Remove all elements in another collection from this collection.

[removeAt](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/remove-at/)
:   Remove and return the element at the specified index. The indices of elements occurring after the

[remove\_all](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/remove_all/)
:   Remove all elements in another collection from this collection.

[remove\_all\_copy](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/remove_all_copy/)
:   Returns a new list whose elements are those found in this list and not in the given collection.

[remove\_at](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/remove_at/)
:   Remove and return the element at the specified index. The indices of elements occurring after the

[repeat](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/repeat/)
:   Repeat this list n times.

[retain\_all](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/retain_all/)
:   Retain in this collection only those elements found in the given collection. In other words, remove

[retain\_all\_copy](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/retain_all_copy/)
:   Return a new list whose elements are those found in both this list and the given collection, or in

[reverse](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/reverse/)
:   Reverses the order of the elements in the list in place.

[reversed](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/reversed/)
:   Returns a new list with the elements of this list in reverse order.

[set](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/set/)
:   Set the element at the specified index, overwriting the element that was previously at that index.

[size](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/size/)
:   Get the size (number of elements) of this collection.

[sort](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/sort/)
:   Sort this list in place.

[sorted](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/sorted/)
:   Sorts the elements of this collection into a list. This collection is not modified.

[str](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/str/)
:   Returns a textual representation of this collection.

[sub](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/sub/)
:   Returns a sublist of this list starting from the specified index (inclusive).

[to\_text](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/list/to_text/)
:   Returns a textual representation of this collection.

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/%5Broot%5D/list/index.html)Generated API reference, mirrored from the live docs
