# subs_repeated function

Apply substitution rules again and again until nothing changes.

## How to write it

### subs_repeated(expr, rules)

**expr**

Any expression: a number, a formula, a list or a matrix. Takes an expression.

**rules**

What to put in place of what. Takes a rule, or a list of rules.

## Examples

- $\displaystyle \operatorname{subs\_repeated}(a, \left[ a \to b, b \to c \right]) = c$

  `subs_repeated(a, [a -> b, b -> c])`

  In the solver, `subs_repeated(a, [a -> b, b -> c])` gives `c`.

  [Open in the solver](https://hilberon.com/?q=subs_repeated%28a%2C%20%5Ba%20-%3E%20b%2C%20b%20-%3E%20c%5D%29)

## Related functions

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

  Subtract a value from a variable in place and return the new value.
- [slot](https://hilberon.com/library/slot)

  The n-th argument of a function with no name: inside function(body), slot(1) is the first.
- [times_by](https://hilberon.com/library/times_by)

  Multiply a variable by a value in place and return the new value.
- [set_delayed](https://hilberon.com/library/set_delayed)

  Define a function; also written f(x) := body.
- [with_effort](https://hilberon.com/library/with_effort)

  Evaluate a body at quick, standard, deep or exhaustive effort.
- [set](https://hilberon.com/library/set)

  Assign a value to a name; also written name := value.

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