February 2018
Intermediate to advanced
350 pages
7h 35m
English
One big part of functional programming as a concept is to use functions in the same way that we use any other type—as values, parameters, returns, and so on. One thing that we can do with other types is to take them as construction blocks to build other types; the same concept can be applied to functions.
Function composition is a technique to build functions using existing functions; similar to Unix pipes or channel pipelines, the result value of a function is used as a parameter for the next one.
In Arrow, function composition comes as a set of the infix extension functions:
|
Function |
Description |
|
compose |
Takes the result of invoking the right-hand function as the parameter for the left-hand function. |
Read now
Unlock full access