Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

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])=c\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
  • 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.