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
|
Rev | Line | |
---|
[d24f17c] | 1 | var _concat =
|
---|
| 2 | /*#__PURE__*/
|
---|
| 3 | require("./internal/_concat.js");
|
---|
| 4 |
|
---|
| 5 | var _curry2 =
|
---|
| 6 | /*#__PURE__*/
|
---|
| 7 | require("./internal/_curry2.js");
|
---|
| 8 |
|
---|
| 9 | var compose =
|
---|
| 10 | /*#__PURE__*/
|
---|
| 11 | require("./compose.js");
|
---|
| 12 |
|
---|
| 13 | var uniq =
|
---|
| 14 | /*#__PURE__*/
|
---|
| 15 | require("./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 |
|
---|
| 35 | var union =
|
---|
| 36 | /*#__PURE__*/
|
---|
| 37 | _curry2(
|
---|
| 38 | /*#__PURE__*/
|
---|
| 39 | compose(uniq, _concat));
|
---|
| 40 |
|
---|
| 41 | module.exports = union; |
---|
Note:
See
TracBrowser
for help on using the repository browser.