1 | var _concat =
|
---|
2 | /*#__PURE__*/
|
---|
3 | require("./internal/_concat.js");
|
---|
4 |
|
---|
5 | var _createPartialApplicator =
|
---|
6 | /*#__PURE__*/
|
---|
7 | require("./internal/_createPartialApplicator.js");
|
---|
8 |
|
---|
9 | var flip =
|
---|
10 | /*#__PURE__*/
|
---|
11 | require("./flip.js");
|
---|
12 | /**
|
---|
13 | * Takes a function `f` and a list of arguments, and returns a function `g`.
|
---|
14 | * When applied, `g` returns the result of applying `f` to the arguments
|
---|
15 | * provided to `g` followed by the arguments provided initially.
|
---|
16 | *
|
---|
17 | * @func
|
---|
18 | * @memberOf R
|
---|
19 | * @since v0.10.0
|
---|
20 | * @category Function
|
---|
21 | * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x)
|
---|
22 | * @param {Function} f
|
---|
23 | * @param {Array} args
|
---|
24 | * @return {Function}
|
---|
25 | * @see R.partial
|
---|
26 | * @example
|
---|
27 | *
|
---|
28 | * const greet = (salutation, title, firstName, lastName) =>
|
---|
29 | * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!';
|
---|
30 | *
|
---|
31 | * const greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']);
|
---|
32 | *
|
---|
33 | * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!'
|
---|
34 | * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b)
|
---|
35 | */
|
---|
36 |
|
---|
37 |
|
---|
38 | var partialRight =
|
---|
39 | /*#__PURE__*/
|
---|
40 | _createPartialApplicator(
|
---|
41 | /*#__PURE__*/
|
---|
42 | flip(_concat));
|
---|
43 |
|
---|
44 | module.exports = partialRight; |
---|