We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Compose functions together, in applicative order.
Alternatives: compose, composeRight.
function compose(...xs) // xs: functions (f, g)
const xasyncfn = require('extra-async-function'); var fn = xasyncfn.compose(Math.sqrt, async x => Math.abs(x)); await fn(-64); // Math.sqrt(Math.abs(-64)) // → 8 var fn = xasyncfn.compose(Math.sqrt, Math.min); await fn(22, 9); // Math.sqrt(Math.min(22, 9)) // → 3