Performs right-to-left composition of Promise-returning functions. The rightmost function may have any arity; the remaining functions must be unary.
Note: ALL of the chained functions must return a Promise.
Note: The result of compose is not automatically curried.
var res = x => Promise.resolve(x); var f = composeP(x => res(-x), (x, y) => res(Math.pow(x, y))); f(3, 4).then(console.log); // -(3^4)
Generated using TypeDoc
Performs right-to-left composition of Promise-returning functions. The rightmost function may have any arity; the remaining functions must be unary.
Note: ALL of the chained functions must return a Promise.
Note: The result of compose is not automatically curried.