In an expression, a function f can be applied to an argument x like this:
This is known as forward, or prefix, application, although it can also be considered, somewhat whimsically, that the gap between the f and the x is an infix operator known as operator whitespace.
Although this is the mathematical syntax for application, many programmers, may prefer to swap the order of the function and argument like this:
This is known as reverse application. Operator dot binds tighter than operator whitespace so this expression:
is parsed as
Both operator dot and operator whitespace are left associative.
Another application operator is stolen from Haskell:
h $ g $ h $ x;
Operator $ binds more weakly then either dot or whitespace, and is right associative so the above parses as:
h (g (h x));
Finally, there is a shortcut for applying a function to the unit tuple ():
which means the same as:
Operator hash # is a prefix operator that binds more tightly than the other application operators.