@zkochan/pnpm
Version:
Fast, disk space efficient package manager
33 lines (30 loc) • 979 B
JavaScript
var _curry3 = /*#__PURE__*/require('./internal/_curry3');
/**
* `o` is a curried composition function that returns a unary function.
* Like [`compose`](#compose), `o` performs right-to-left function composition.
* Unlike [`compose`](#compose), the rightmost function passed to `o` will be
* invoked with only one argument.
*
* @func
* @memberOf R
* @since v0.24.0
* @category Function
* @sig (b -> c) -> (a -> b) -> a -> c
* @param {Function} f
* @param {Function} g
* @return {Function}
* @see R.compose, R.pipe
* @example
*
* var classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + name.last
* var yellGreeting = R.o(R.toUpper, classyGreeting);
* yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND"
*
* R.o(R.multiply(10), R.add(10))(-4) //=> 60
*
* @symb R.o(f, g, x) = f(g(x))
*/
var o = /*#__PURE__*/_curry3(function o(f, g, x) {
return f(g(x));
});
module.exports = o;