Mathematica includes advanced programming methods from modern computer science--as well as adding a host of new ideas of its own.
Many operations are automatically threaded over lists.
This flattens out sublists.
This partitions into sublists of length 2.
The is a "pure function". The argument is inserted into the # slot.
The _ stands for a single expression; __ stands for any sequence of expressions.
Here are three definitions to be associated with the object h.
This uses the definitions made for h.
Many of Mathematica's most powerful functions mix different programming paradigms.
Mathematica gives you the flexibility to write programs in many different styles.
After you have finished with definitions for f, you must clear them.