Legacy Documentation

Mathematica® Teacher's Edition (2002)

This is documentation for an obsolete product.
Current products and services
 Documentation /  Mathematica Teacher's Edition /  Built-in Functions /  Programming /  Rule Application /

ReplaceRepeated

FilledSmallSquare expr //. rules repeatedly performs replacements until expr no longer changes.

FilledSmallSquare expr //. rules effectively applies /. repeatedly, until the results it gets no longer change.
FilledSmallSquare It performs one complete pass over the expression using /., then carries out the next pass.
FilledSmallSquare You should be very careful to avoid infinite loops when you use the //. operator. The command x //. x -> x + 1 will, for example, lead to an infinite loop.
FilledSmallSquare ReplaceRepeated will try to apply the rules you give a maximum of 65536 times.
FilledSmallSquare See The Mathematica Book on the web: Section 2.4.1.
FilledSmallSquare See also: ReplaceAll, Rule, Set, FixedPoint.