FixedPointList

FixedPointList[f,expr]

generates a list giving the results of applying f repeatedly, starting with expr, until the results no longer change.

Details and Options

  • FixedPointList[f,expr] gives expr as the first element of the list it produces.
  • The last two elements in the list produced by FixedPointList are always the same.
  • FixedPointList[f,expr,n] stops after at most n steps.
  • FixedPointList[f,expr] applies SameQ to successive pairs of results to determine whether a fixed point has been reached.
  • FixedPointList[f,expr,,SameTest->s] applies s to successive pairs of results.

Examples

open allclose all

Basic Examples  (2)

Find the sequence of values leading to a fixed point:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Repeated application of a rule until the result no longer changes:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Generalizations & Extensions  (1)

Options  (1)

Applications  (6)

Properties & Relations  (4)

Possible Issues  (1)

Neat Examples  (1)

See Also

FixedPoint  NestWhileList  NestList  ComposeList

Tutorials

Introduced in 1991
(2.0)