Further Examples: Function (&)
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.
MyHead uses the third argument of Function to define a version of Head that does not evaluate its arguments.
If the argument comes in unevaluated, it will remain that way.
This is in contrast to Head.
This tests unevaluated products to see if they contain spurious zeros.
This uses DeleteCases to delete the zeros so that the products do not evaluate to zero.
Here is a held list of elements.
This groups consecutive elements that have the same head.
This does not work since the ordinary form of pure function will evaluate #1 and #2, which destroys the structure in expressions such as and .