Mathematica 9 is now available

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

Apply

FilledSmallSquare Apply[f, expr] or f @@ expr replaces the head of expr by f.

FilledSmallSquare Apply[f, expr, levelspec] replaces heads in parts of expr specified by levelspec.

FilledSmallSquare Examples: Apply[f, a, b, c] LongRightArrow; Apply[Plus, g[a, b]] LongRightArrow.

FilledSmallSquare Level specifications are described in Section A.3.6.

FilledSmallSquare The default value for levelspec in Apply is {0}.

FilledSmallSquare f @@@ expr is equivalent to Apply[f, expr, 1].

FilledSmallSquare Examples: Apply[f, a,b,c,d] LongRightArrow.

FilledSmallSquare Apply[f, a,b,c,d, 1] LongRightArrow.

FilledSmallSquare Apply[f, a, -2] LongRightArrow.

FilledSmallSquare Apply operates on SparseArray objects just as it would on the corresponding ordinary lists.

FilledSmallSquare See Section 2.2.3.

FilledSmallSquare See also: Map, Scan, Level, Operate, MapThread, Total.

FilledSmallSquare New in Version 1; modified in 4.0.

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.