Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > List Manipulation >
Mathematica > Data Manipulation > Handling Arrays of Data >
Applying Functions to Lists
Many computations are conveniently specified in terms of applying functions in parallel to many elements in a list. Mathematica provides a suite of elegant functional programming constructs for doing this. In Mathematica, mathematical functions are automatically taken to be "listable", so that they are always applied to every element in a list.
Map (/@) map a function over a list, at specified levels
Apply (@@, @@@) — apply a function to a list, at specified levels
MapIndexed map a function, including index information
MapAt map a function at particular positions
Scan scan over every element of a list, applying a function
    
FoldList successively apply a function, "folding in" elements from a list
ComposeList  ▪ Outer  ▪ Inner  ▪ Accumulate  ▪ Differences  ▪ Ratios
MapThread map a function across corresponding elements in multiple lists
    
Thread "thread" a function across lists that appear in its arguments
Listable attribute for any function to automatically thread over lists
TUTORIALS
MORE ABOUT
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team