Skip to main content
Module

x/fun/mod.ts>newtype.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 newtype.getEq
import { newtype } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { getEq } = newtype;

Retype an existing Eq from an inner type to a Newtype.

Examples

Example 1

import { Newtype, getEq } from "./newtype.ts";
import * as N from "./number.ts";

type Integer = Newtype<'Integer', number>;

const eqInteger = getEq<Integer>(N.EqNumber);