Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Expressions > Parts of Expressions >

MapAll (//@)

MapAll[f, expr]
or f//@expr applies f to every subexpression in expr.
Apply f to every subpart of an expression:
Alternative input form:
Apply f to every subpart of an expression:
In[1]:=
Click for copyable input
Out[1]=
 
Alternative input form:
In[1]:=
Click for copyable input
Out[1]=
MapAll can be used on expressions with any head:
The function can be mapped onto the heads as well:
MapAll can be used on sparse arrays:
Apply f to heads as well as ordinary parts of expressions:
Show nesting structure of an expression:
Leaves are visited before roots:
MapAll is equivalent to a specific level specification in Map:
MapAll maps also around the whole expression; Map[f, expr, Infinity] does not:
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team