import { set } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { copy } = set;
Copies an existing ReadonlySet into a new ReadonlySet, keeping references to the original members.
Examples
Example 1
Example 1
import * as S from "./set.ts";
const original = S.set(1, 2, 3);
const copy = S.copy(original);
const result1 = original === copy; // false
const has = (value: number) => original.has(value) === copy.has(value);
const result2 = has(1); // true;
const result3 = has(10); // true;
Parameters
ua: ReadonlySet<A>