Pipeline notation for functions
Uses
The traditional notation for function application and function composition makes the flow of data and operations happen from right to left. It is often preferable to use left-to-right order, making a chain of functions look like a pipeline t
This can be achieved by defining "reverse" function composition as
and replacing it by the traditional syntax via
Function application can be defined using the same operator,
which is replaced by standard function application via
Example
Uses the function
Squaring a number twice via two consecutive function applications:
Squaring a number twice via application of a composed function: