This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

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


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