compose
Summary
Performs a right-to-left function composition.
Description
Given a list of functions returns a new function that takes any number of parameters and applies the rightmost function to them, the result of which is fed into the second rightmost function, etc. Returns the return value of the leftmost function.
Examples
1 2 3 |
|
Parameters
Name | Type | Description |
---|---|---|
fn | function |
Return
function