Basic Examples (4)
Basic Examples
(4)
Replace every instance of an expression, but ignore cases contained in a particular head:
In[1]:=
Out[1]=
{y,f[x],y}
In[2]:=
Out[2]=
{g[f[1]],3,1+g[3]}
———
Exact matches are also ignored:
In[1]:=
Out[1]=
{x,x,3,x,x}
———
Provide a list of replacement rules:
In[1]:=
Out[1]=
{y,f[x,a],b}
———
Provide nested lists of replacement rules:
In[1]:=
Out[1]=
{{y,f[x,a],b},{1,f[x,a],2}}
Scope (2)
Scope
(2)
Applications (3)
Applications
(3)