Function combinators
Function combinators are heavily used in a style of programming called tacit programming or point-free programming. The principle is to build functions as combinations of smaller functions without ever explicitly naming arguments (called "points" in this context). Point-free code tends to be very compact. Depending on context and the reader's familiarity with the idioms of the style, this can make is either clearer or more obscure. Use with caution!
The most common combinator, function composition, has already been defined in Functions.
The use of function combinators makes it useful to have a function that does nothing, commonly called the
identity function
:
A
fork
combines two functions of one argument into a single function of one argument whose result is the tuple combining the results of the input functions: