# constant_array function

A list of copies of a value.

## How to write it

### constant_array(x, n)

**x**

The value. Takes an expression.

**n**

How many copies. Takes a whole number.

## Examples

- $\displaystyle \operatorname{constant\_array}(0, 3) = \left[ 0, 0, 0 \right]$

  `constant_array(0, 3)`

  In the solver, `constant_array(0, 3)` gives `[0, 0, 0]`.

  [Open in the solver](https://hilberon.com/?q=constant_array%280%2C%203%29)

## Related functions

- [count](https://hilberon.com/library/count)

  How many elements of a list equal a value.
- [complement](https://hilberon.com/library/complement)

  The elements of a list that are in none of the others.
- [dimensions](https://hilberon.com/library/dimensions)

  The size of a list or a matrix, level by level.
- [apply](https://hilberon.com/library/apply)

  Replace the head of an expression, or the brackets of a list, with a function.
- [drop](https://hilberon.com/library/drop)

  A list without its first elements.
- [append](https://hilberon.com/library/append)

  A list with an element added at the end.

---
Source: https://hilberon.com/library/constant_array
