MCPcopy Create free account
hub / github.com/freecodexyz/free-code / union

Function union

src/utils/set.ts:44–53  ·  view source on GitHub ↗
(a: Set<A>, b: Set<A>)

Source from the content-addressed store, hash-verified

42 * Note: this code is hot, so is optimized for speed.
43 */
44export function union<A>(a: Set<A>, b: Set<A>): Set<A> {
45 const result = new Set<A>()
46 for (const item of a) {
47 result.add(item)
48 }
49 for (const item of b) {
50 result.add(item)
51 }
52 return result
53}

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected