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

> function add_ all(index: integer , values: collection <-T>): boolean Insert all elements from a collection at the specified index. Any elements previously 

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

FUNCTION

# list.add\_all

```signature
function add_all(index: integer, values: collection<-T>): boolean
```

Insert all elements from a collection at the specified index. Any elements previously occurring at
and after the specified index have their indices increased by the size of the given collection. The
size of the list increases by the size of the given collection.

Note that for a list `my_list`:

* `my_list.add_all(my_list.size(), x)` "appends" the elements of the collection `x` to the end of
  the list
* `my_list.add_all(my_list.size() + 1, x)` throws an exception

Note also that `my_list.add_all(my_list.size(), x)` is equivalent to `my_list.add_all(x)` (inherited
from `collection<T>`).

**Parameters**

* **index** — the starting index at which to add the elements
* **values** — the collection containing elements to add

**Returns**

`true`

**Throws**

* `exception` — if the specified index is out of bounds

Since 0.9.0

---

```signature
function add_all(values: collection<-T>): boolean
```

Add all elements from another collection to the end of this collection.

If this collection does not allow duplicates, then only those elements not already contained in this
collection are added.

**Parameters**

* **values** — the collection of elements to add

**Returns**

`true` if any elements were added to this collection, `false` if it was not modified

Since 0.9.0

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