Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/set.ts>getEq

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function getEq
import { getEq } from "https://deno.land/x/fun@v2.0.0-alpha.6/set.ts";

Given an instance of Eq return Eq<ReadonlySet>.

Examples

Example 1

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

const { equals } = S.getEq(N.EqNumber);

const result1 = pipe(
  S.set(1, 2, 3),
  equals(S.set(3, 2, 1)),
); // true
const result2 = pipe(
  S.set(1, 2, 3),
  equals(S.set(1, 2, 3, 4)),
); // false

Returns

Eq<ReadonlySet<A>>