Function composition

From HaskellWiki

Function composition is the act of pipelining the result of one function, to the input of another, creating an entirely new function.

1 Discussion and example

This can be done with any two functions, where the argument type of the first is the return type of the second. The newly created function takes what the second function would as a parameter and feeds it through the second function, then the result of the second function through the first function, and returns the result of the first function.

Mathematically, this is most often represented by the operator, where (often read as f of g) is the composition of f with g.