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

isSubset

import { isSubset } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/set.ts";

Given an instance of Comparable return a function second => first => boolean that returns true when every member of first is in second.

@example
import * as S from "./set.ts";
import * as N from "./number.ts";
import { pipe } from "./fn.ts";

const subset = S.isSubset(N.ComparableNumber);

const big = S.set(1, 2, 3, 4, 5);
const small = S.set(2, 4);

const result1 = pipe(big, subset(small)); // false
const result2 = pipe(small, subset(big)); // true;
function isSubset<A>(S: Comparable<A>): (second: ReadonlySet<A>) => (first: ReadonlySet<A>) => boolean;
§
isSubset<A>(S: Comparable<A>): (second: ReadonlySet<A>) => (first: ReadonlySet<A>) => boolean
[src]

§Type Parameters

§Parameters

§Return Type

§
(second: ReadonlySet<A>) => (first: ReadonlySet<A>) => boolean
[src]