source: node_modules/ramda/src/union.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: 766 bytes
Line 
1var _concat =
2/*#__PURE__*/
3require("./internal/_concat.js");
4
5var _curry2 =
6/*#__PURE__*/
7require("./internal/_curry2.js");
8
9var compose =
10/*#__PURE__*/
11require("./compose.js");
12
13var uniq =
14/*#__PURE__*/
15require("./uniq.js");
16/**
17 * Combines two lists into a set (i.e. no duplicates) composed of the elements
18 * of each list.
19 *
20 * @func
21 * @memberOf R
22 * @since v0.1.0
23 * @category Relation
24 * @sig [*] -> [*] -> [*]
25 * @param {Array} as The first list.
26 * @param {Array} bs The second list.
27 * @return {Array} The first and second lists concatenated, with
28 * duplicates removed.
29 * @example
30 *
31 * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4]
32 */
33
34
35var union =
36/*#__PURE__*/
37_curry2(
38/*#__PURE__*/
39compose(uniq, _concat));
40
41module.exports = union;
Note: See TracBrowser for help on using the repository browser.