Further Examples: Apply (@@)
This substitutes New for Old at the head of the expression using the shorthand notation for Apply. (Neither New nor Old has a built-in meaning in Mathematica.)
This is the same thing.
The head of a product is Times.
The head of a list is List.
You can see heads explicitly using FullForm.
This substitutes Times for List.
This changes a line into a polygon.
This constructs a list of circles from a list of pairs of centers and radii.
Here is another way to write the previous expression.
Here, Apply replaces heads in subexpressions at level .
Here is a list.
This defines a function ff that permutes mm.
The permutation can be written as a list of ordered pairs.
Another way to write the permutation is as a list of rules.
These rules can be represented more compactly as a list of cycles.
This defines the function CyclesfromRules that finds all cycles from a list of rules.
Here are the cycles of ff using CyclesfromRules.