You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import _isPlaceholder from "./_isPlaceholder.js";
|
|
/**
|
|
* Optimized internal one-arity curry function.
|
|
*
|
|
* @private
|
|
* @category Function
|
|
* @param {Function} fn The function to curry.
|
|
* @return {Function} The curried function.
|
|
*/
|
|
|
|
export default function _curry1(fn) {
|
|
return function f1(a) {
|
|
if (arguments.length === 0 || _isPlaceholder(a)) {
|
|
return f1;
|
|
} else {
|
|
return fn.apply(this, arguments);
|
|
}
|
|
};
|
|
}
|