This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Built-in Functions / Programming / Functional Programming /

FixedPoint

FilledSmallSquare FixedPoint[f, expr] starts with expr, then applies f repeatedly until the result no longer changes.

FilledSmallSquare FixedPoint[f, expr, n] stops after at most n steps.

FilledSmallSquare FixedPoint always returns the last result it gets.

FilledSmallSquare You can use Throw to exit from FixedPoint before it is finished.

FilledSmallSquare FixedPoint[f, expr] applies SameQ to successive pairs of results to determine whether a fixed point has been reached.

FilledSmallSquare NestWhile[f, expr, comp, 2] uses a general comparison function.

FilledSmallSquare See Section 2.2.2.

FilledSmallSquare See also: FixedPointList, NestWhile, Nest, ReplaceRepeated.

FilledSmallSquare New in Version 1; modified in 3.

Further Examples