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:
436 bytes
|
Line | |
---|
1 | import _isPlaceholder from "./_isPlaceholder.js";
|
---|
2 | /**
|
---|
3 | * Optimized internal one-arity curry function.
|
---|
4 | *
|
---|
5 | * @private
|
---|
6 | * @category Function
|
---|
7 | * @param {Function} fn The function to curry.
|
---|
8 | * @return {Function} The curried function.
|
---|
9 | */
|
---|
10 |
|
---|
11 | export default function _curry1(fn) {
|
---|
12 | return function f1(a) {
|
---|
13 | if (arguments.length === 0 || _isPlaceholder(a)) {
|
---|
14 | return f1;
|
---|
15 | } else {
|
---|
16 | return fn.apply(this, arguments);
|
---|
17 | }
|
---|
18 | };
|
---|
19 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.