Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Apply

Usage

Apply[f, expr] or f @@ expr replaces the head of expr by f.
Apply[f, expr, levelspec] replaces heads in parts of expr specified by levelspec.


Notes

• Examples: Apply[f,  a, b, c ]LongRightArrow ; Apply[Plus, g[a, b]]LongRightArrow .
• Level specifications are described in Section A.3.6.
• The default value for levelspec in Apply is {0}.
f @@@ expr is equivalent to Apply[f, expr, {1}].
• Examples: Apply[f,   a,b , c,d  ]LongRightArrow .
Apply[f,   a,b , c,d  ,  1 ]LongRightArrow .
Apply[f,     a    , -2]LongRightArrow .
Apply operates on SparseArray objects just as it would on the corresponding ordinary lists.
• See Section 2.2.3.
• See also: Map, Scan, Level, Operate, MapThread, Total.
• New in Version 1; modified in 4.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: