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
subs_repeated(a, [a -> b, b -> c])In the solver,
Open in the solversubs_repeated(a, [a -> b, b -> c])givesc.
Related functions
- subtract_from
Subtract a value from a variable in place and return the new value.
- slot
The n-th argument of a function with no name: inside function(body), slot(1) is the first.
- times_by
Multiply a variable by a value in place and return the new value.
- set_delayed
Define a function; also written f(x) := body.
- with_effort
Evaluate a body at quick, standard, deep or exhaustive effort.
- set
Assign a value to a name; also written name := value.