Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

getCombinableSet

import { getCombinableSet } 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.getCombinableSet(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()
function getCombinableSet<A>(S: Comparable<A>): Combinable<ReadonlySet<A>>;
§
getCombinableSet<A>(S: Comparable<A>): Combinable<ReadonlySet<A>>
[src]

§Type Parameters

§Parameters

§Return Type

§
Combinable<ReadonlySet<A>>
[src]