Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


repeatedly performs replacements until expr no longer changes.

Details and OptionsDetails and Options

  • effectively applies repeatedly, until the results it gets no longer change.
  • It performs one complete pass over the expression using , then carries out the next pass.
  • You should be very careful to avoid infinite loops when you use the operator. The command will, for example, lead to an infinite loop.
  • ReplaceRepeated takes the option MaxIterations, which specifies the maximum number of times it will try to apply the rules you give. The default setting is MaxIterations->65536. With MaxIterations->Infinity there is no limit.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Apply rules for the power and product laws for logarithms of real numbers recursively:

Click for copyable input
Click for copyable input

ReplaceAll does just a single replacement:

Click for copyable input
Introduced in 1988