UNPKG

692 BJavaScriptView Raw
1import _concat from "./internal/_concat.js";
2import _curry2 from "./internal/_curry2.js";
3import compose from "./compose.js";
4import uniq from "./uniq.js";
5/**
6 * Combines two lists into a set (i.e. no duplicates) composed of the elements
7 * of each list.
8 *
9 * @func
10 * @memberOf R
11 * @since v0.1.0
12 * @category Relation
13 * @sig [*] -> [*] -> [*]
14 * @param {Array} as The first list.
15 * @param {Array} bs The second list.
16 * @return {Array} The first and second lists concatenated, with
17 * duplicates removed.
18 * @example
19 *
20 * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4]
21 */
22
23var union =
24/*#__PURE__*/
25_curry2(
26/*#__PURE__*/
27compose(uniq, _concat));
28
29export default union;
\No newline at end of file