source: node_modules/ramda-adjunct/lib/curryRight.js@ e48199a

main
Last change on this file since e48199a was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5var _ramda = require("ramda");
6var _curryRightN = _interopRequireDefault(require("./curryRightN"));
7function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
8/**
9 * Returns a curried equivalent of the provided function.
10 * This function is like curry, except that the provided arguments order is reversed.
11 *
12 * @func curryRight
13 * @memberOf RA
14 * @since {@link https://char0n.github.io/ramda-adjunct/1.12.0|v1.12.0}
15 * @category Function
16 * @sig (* -> a) -> (* -> a)
17 * @param {Function} fn The function to curry
18 * @return {Function} A new, curried function
19 * @see {@link http://ramdajs.com/docs/#curry|R.curry}, {@link RA.curryRightN|curryRightN}
20 * @example
21 *
22 * const concatStrings = (a, b, c) => a + b + c;
23 * const concatStringsCurried = RA.curryRight(concatStrings);
24 *
25 * concatStringCurried('a')('b')('c'); // => 'cba'
26 */
27var curryRight = (0, _ramda.converge)(_curryRightN["default"], [_ramda.length, _ramda.identity]);
28var _default = curryRight;
29exports["default"] = _default;
Note: See TracBrowser for help on using the repository browser.