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:
466 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | var _isPlaceholder =
|
---|
| 2 | /*#__PURE__*/
|
---|
| 3 | require("./_isPlaceholder.js");
|
---|
| 4 | /**
|
---|
| 5 | * Optimized internal one-arity curry function.
|
---|
| 6 | *
|
---|
| 7 | * @private
|
---|
| 8 | * @category Function
|
---|
| 9 | * @param {Function} fn The function to curry.
|
---|
| 10 | * @return {Function} The curried function.
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | function _curry1(fn) {
|
---|
| 15 | return function f1(a) {
|
---|
| 16 | if (arguments.length === 0 || _isPlaceholder(a)) {
|
---|
| 17 | return f1;
|
---|
| 18 | } else {
|
---|
| 19 | return fn.apply(this, arguments);
|
---|
| 20 | }
|
---|
| 21 | };
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | module.exports = _curry1; |
---|
Note:
See
TracBrowser
for help on using the repository browser.