forked from waja/action-debian-package
44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
|
var _concat =
|
||
|
/*#__PURE__*/
|
||
|
require("./internal/_concat");
|
||
|
|
||
|
var _createPartialApplicator =
|
||
|
/*#__PURE__*/
|
||
|
require("./internal/_createPartialApplicator");
|
||
|
|
||
|
var flip =
|
||
|
/*#__PURE__*/
|
||
|
require("./flip");
|
||
|
/**
|
||
|
* Takes a function `f` and a list of arguments, and returns a function `g`.
|
||
|
* When applied, `g` returns the result of applying `f` to the arguments
|
||
|
* provided to `g` followed by the arguments provided initially.
|
||
|
*
|
||
|
* @func
|
||
|
* @memberOf R
|
||
|
* @since v0.10.0
|
||
|
* @category Function
|
||
|
* @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x)
|
||
|
* @param {Function} f
|
||
|
* @param {Array} args
|
||
|
* @return {Function}
|
||
|
* @see R.partial
|
||
|
* @example
|
||
|
*
|
||
|
* const greet = (salutation, title, firstName, lastName) =>
|
||
|
* salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!';
|
||
|
*
|
||
|
* const greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']);
|
||
|
*
|
||
|
* greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!'
|
||
|
* @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b)
|
||
|
*/
|
||
|
|
||
|
|
||
|
var partialRight =
|
||
|
/*#__PURE__*/
|
||
|
_createPartialApplicator(
|
||
|
/*#__PURE__*/
|
||
|
flip(_concat));
|
||
|
|
||
|
module.exports = partialRight;
|