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

> function repeat(n: integer ): list <T> Repeat this list n times. Examples: [1, 2, 3].repeat(3) returns [1, 2, 3, 1, 2, 3, 1, 2, 3] list<T>().repeat(3) retu

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

FUNCTION

# list.repeat

```signature
function repeat(n: integer): list<T>
```

Repeat this list `n` times.

Examples:

* `[1, 2, 3].repeat(3)` returns `[1, 2, 3, 1, 2, 3, 1, 2, 3]`
* `list<T>().repeat(3)` returns `[]` (for any type `T`)
* `[3].repeat(0)` returns `[]`

**Parameters**

* **n** — the number of times to repeat this list

**Returns**

a new list with the elements from this list repeated `n` times

**Throws**

* `exception` — when: - `n` is negative - `n` is greater than `(2^31)-1` - the resulting list has size greater than `(2^31)-1`

Since 0.11.0

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