# nest_list function

The steps of nest: the value after each application, starting from the first.

## How to write it

### nest_list(f, x, n)

**f**

The function to apply. Takes a function.

**x**

The first value. Takes an expression.

**n**

How many times. Takes a whole number.

## Examples

- $\displaystyle \operatorname{nest\_list}(\operatorname{sqrt}, 16, 2) = \left[ 16, 4, 2 \right]$

  `nest_list(sqrt, 16, 2)`

  In the solver, `nest_list(sqrt, 16, 2)` gives `[16, 4, 2]`.

  [Open in the solver](https://hilberon.com/?q=nest_list%28sqrt%2C%2016%2C%202%29)

## Related functions

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

  Apply a function again and again to a value.
- [list](https://hilberon.com/library/list)

  A list of the arguments.
- [fold_list](https://hilberon.com/library/fold_list)

  The steps of fold: every partial result, starting from the first value.
- [part](https://hilberon.com/library/part)

  Read part of a list by position, counting from 1; also written list\[i\].
- [partition](https://hilberon.com/library/partition)

  A list split into blocks of a given length.
- [most](https://hilberon.com/library/most)

  A list without its last element.

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