ReplaceRepeated
expr //. rule
replaces all occurences of the LHS of rule
with the RHS of rule
in expr
repeatedly until the expression stabilizes.
expr //. {r1, r2, ...}
performes the same operation as expr //. rule
, but evaluating each r_n
in sequence.
Attributes[ReplaceRepeated] := {Protected}
Simple examples
ReplaceRepeated
can be used to implement logarithm expansion: