source: node_modules/ramda-adjunct/src/concatRight.js

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: 1.0 KB
RevLine 
[d24f17c]1import { concat, flip } from 'ramda';
2
3/**
4 * Returns the result of concatenating the given lists or strings.
5 *
6 * Note: R.concat expects both arguments to be of the same type, unlike
7 * the native Array.prototype.concat method.
8 * It will throw an error if you concat an Array with a non-Array value.
9 * Dispatches to the concat method of the second argument, if present.
10 *
11 * @func concatRight
12 * @memberOf RA
13 * @since {@link https://char0n.github.io/ramda-adjunct/1.11.0|v1.11.0}
14 * @category List
15 * @sig [a] -> [a] -> [a]
16 * @sig String -> String -> String
17 * @param {Array|String} firstList The first list
18 * @param {Array|String} secondList The second list
19 * @return {Array|String} A list consisting of the elements of `secondList`
20 * followed by the elements of `firstList`.
21 * @see {@link http://ramdajs.com/docs/#concat|R.concat}
22 * @example
23 *
24 * RA.concatRight('ABC', 'DEF'); //=> 'DEFABC'
25 * RA.concatRight([4, 5, 6], [1, 2, 3]); //=> [1, 2, 3, 4, 5, 6]
26 * RA.concatRight([], []); //=> []
27 */
28const concatRight = flip(concat);
29
30export default concatRight;
Note: See TracBrowser for help on using the repository browser.