source: node_modules/ramda/es/partialRight.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1import _concat from "./internal/_concat.js";
2import _createPartialApplicator from "./internal/_createPartialApplicator.js";
3import flip from "./flip.js";
4/**
5 * Takes a function `f` and a list of arguments, and returns a function `g`.
6 * When applied, `g` returns the result of applying `f` to the arguments
7 * provided to `g` followed by the arguments provided initially.
8 *
9 * @func
10 * @memberOf R
11 * @since v0.10.0
12 * @category Function
13 * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x)
14 * @param {Function} f
15 * @param {Array} args
16 * @return {Function}
17 * @see R.partial
18 * @example
19 *
20 * const greet = (salutation, title, firstName, lastName) =>
21 * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!';
22 *
23 * const greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']);
24 *
25 * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!'
26 * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b)
27 */
28
29var partialRight =
30/*#__PURE__*/
31_createPartialApplicator(
32/*#__PURE__*/
33flip(_concat));
34
35export default partialRight;
Note: See TracBrowser for help on using the repository browser.