|
Apply
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.
Examples: Apply[f, a, b, c ]  ; Apply[Plus, g[a, b]]  .
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 ]  .
Apply[f,  a,b , c,d , 1 ]  .
Apply[f,    a   , -2]  .
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.0.
Further Examples
|