pragmatic-fp-ts
Version:
Opinionated functional programming library with easy use in mind
12 lines (11 loc) • 339 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.union = void 0;
function union(a, b) {
if (arguments.length === 1)
return (b_) => union(a, b_);
const values = new Set(a || []);
(b || []).forEach((value) => values.add(value));
return Array.from(values);
}
exports.union = union;