import { set } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { isSubset } = set;
Given an instance of Comparable return a function
second => first => boolean
that returns true when
every member of first is in second.
Examples
Example 1
Example 1
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;
Parameters
S: Comparable<A>