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

> function set(index: integer , value: T): T Set the element at the specified index, overwriting the element that was previously at that index.
The size of t

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

FUNCTION

# list.set

```signature
function set(index: integer, value: T): T
```

Set the element at the specified index, overwriting the element that was previously at that index.
The size of the list is unchanged.

**Parameters**

* **index** — the index of the element to set
* **value** — the value to set

**Returns**

the overwritten element

**Throws**

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

Since 0.6.0

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