ramda-adjunct
Version:
Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.
32 lines (31 loc) • 1.17 kB
JavaScript
exports.__esModule = true;
exports["default"] = void 0;
var _ramda = require("ramda");
/**
* Returns the result of concatenating the given lists or strings.
*
* Note: R.concat expects both arguments to be of the same type, unlike
* the native Array.prototype.concat method.
* It will throw an error if you concat an Array with a non-Array value.
* Dispatches to the concat method of the second argument, if present.
*
* @func concatRight
* @memberOf RA
* @since {@link https://char0n.github.io/ramda-adjunct/1.11.0|v1.11.0}
* @category List
* @sig [a] -> [a] -> [a]
* @sig String -> String -> String
* @param {Array|String} firstList The first list
* @param {Array|String} secondList The second list
* @return {Array|String} A list consisting of the elements of `secondList`
* followed by the elements of `firstList`.
* @see {@link http://ramdajs.com/docs/#concat|R.concat}
* @example
*
* RA.concatRight('ABC', 'DEF'); //=> 'DEFABC'
* RA.concatRight([4, 5, 6], [1, 2, 3]); //=> [1, 2, 3, 4, 5, 6]
* RA.concatRight([], []); //=> []
*/
var concatRight = (0, _ramda.flip)(_ramda.concat);
var _default = exports["default"] = concatRight;
;