main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
743 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | /**
|
---|
| 2 | * A special placeholder value used to specify "gaps" within curried functions,
|
---|
| 3 | * allowing partial application of any combination of arguments, regardless of
|
---|
| 4 | * their positions.
|
---|
| 5 | *
|
---|
| 6 | * If `g` is a curried ternary function and `_` is `R.__`, the following are
|
---|
| 7 | * equivalent:
|
---|
| 8 | *
|
---|
| 9 | * - `g(1, 2, 3)`
|
---|
| 10 | * - `g(_, 2, 3)(1)`
|
---|
| 11 | * - `g(_, _, 3)(1)(2)`
|
---|
| 12 | * - `g(_, _, 3)(1, 2)`
|
---|
| 13 | * - `g(_, 2, _)(1, 3)`
|
---|
| 14 | * - `g(_, 2)(1)(3)`
|
---|
| 15 | * - `g(_, 2)(1, 3)`
|
---|
| 16 | * - `g(_, 2)(_, 3)(1)`
|
---|
| 17 | *
|
---|
| 18 | * @name __
|
---|
| 19 | * @constant
|
---|
| 20 | * @memberOf R
|
---|
| 21 | * @since v0.6.0
|
---|
| 22 | * @category Function
|
---|
| 23 | * @example
|
---|
| 24 | *
|
---|
| 25 | * const greet = R.replace('{name}', R.__, 'Hello, {name}!');
|
---|
| 26 | * greet('Alice'); //=> 'Hello, Alice!'
|
---|
| 27 | */
|
---|
| 28 | module.exports = {
|
---|
| 29 | '@@functional/placeholder': true
|
---|
| 30 | }; |
---|
Note:
See
TracBrowser
for help on using the repository browser.