MATHEMATICA FEATURED EXAMPLE

Use Rules Iteratively

While ReplaceAll () applies rules to an expression only once, ReplaceRepeated () will continue to do so until the expression no longer changes.

    
In[42]:=
Click for copyable input
In[44]:=
Click for copyable input
Out[44]=
In[45]:=
Click for copyable input
Out[45]=
You can also use ReplaceRepeated to undo "currying" of function arguments:
In[77]:=
Click for copyable input
Out[77]=
New to Mathematica? Find your learning path »
Have a question? Ask support »