Skip to main content
Module

x/fun/newtype.ts>getComparable

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 getComparable
import { getComparable } from "https://deno.land/x/fun@v2.0.0-alpha.12/newtype.ts";

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

Examples

Example 1

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

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

const eqInteger = getComparable<Integer>(N.ComparableNumber);