UNPKG

754 BJavaScriptView Raw
1var _concat =
2/*#__PURE__*/
3require("./internal/_concat");
4
5var _curry2 =
6/*#__PURE__*/
7require("./internal/_curry2");
8
9var compose =
10/*#__PURE__*/
11require("./compose");
12
13var uniq =
14/*#__PURE__*/
15require("./uniq");
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;
\No newline at end of file