getInitializableSet
import { getInitializableSet } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/set.ts";Given an instance of Comparable create a Combinable<ReadonlySet> where combine creates a union of two ReadonlySets.
@example
import * as S from "./set.ts";
import * as N from "./number.ts";
import * as M from "./combinable.ts";
import { pipe } from "./fn.ts";
const monoid = S.getInitializableSet(N.ComparableNumber);
const combineAll = M.getCombineAll(monoid);
const result1 = combineAll(
S.set(1, 2, 3),
S.set(4, 5, 6),
S.set(1, 3, 5, 7)
); // Set(1, 2, 3, 4, 5, 6, 7)
const result3 = combineAll(S.init()); // Set()