] or body
& is a pure function. The formal parameters are # (or #1), #2, etc.
] is a pure function with a single formal parameter x.
] is a pure function with a list of formal parameters.
Example: (# + 1)&[x].
Map[(# + 1)&,
x, y, z
] or body
& is applied to a set of arguments, # (or #1) is replaced by the first argument, #2 by the second, and so on. #0 is replaced by the function itself.
If there are more arguments supplied than #
i in the function, the remaining arguments are ignored.
## stands for the sequence of all arguments supplied.
n stands for arguments from number n on.
f[##, ##2]& [x, y, z].
Function is analogous to in LISP or formal logic.
Function has attribute HoldAll. The function body is evaluated only after the formal parameters have been replaced by arguments.
The named formal parameters in Function[
] are treated as local, and are renamed
$ when necessary to avoid confusion with actual arguments supplied to the function.
Function is treated as a scoping construct (see Section A.3.8).
] represents a pure function that is to be treated as having attributes for the purpose of evaluation.
See the Mathematica book: Section 2.2.5.
See also: Apply, CompiledFunction.
Here is a pure function that squares its argument.
You can pass an argument to pure functions just as if they were ordinary functions like Sin or Min.
These use the shorthand notation for a pure function.
If your function needs several parameters, you specify them explicitly.
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER
FOR THE LATEST INFORMATION.