Mathematica 9 is now available

Documentation / Mathematica / Built-in Functions / Programming / Functional Programming /

Map

FilledSmallSquare Map[f, expr] or f /@ expr applies f to each element on the first level in expr.

FilledSmallSquare Map[f, expr, levelspec] applies f to parts of expr specified by levelspec.

FilledSmallSquare Examples: Map[f, a, b, c] LongRightArrow; Map[f, a + b + c] LongRightArrow.

FilledSmallSquare Level specifications are described in Section A.3.6.

FilledSmallSquare The default value for levelspec in Map is {1}.

FilledSmallSquare Examples: Map[f, a,b,c,d] LongRightArrow; Map[f, a,b,c,d, 2] LongRightArrow; Map[f, a,b,c,d, -1] LongRightArrow.

FilledSmallSquare If expr is a SparseArray object, Map[f, expr] applies f to the values or subarrays that appear in expr.

FilledSmallSquare See Section 2.2.4.

FilledSmallSquare See also: Apply, Scan, MapAll, MapAt, MapIndexed, MapThread, Level, Operate.

FilledSmallSquare New in Version 1.

Further Examples



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.