Skip to main content
Module

x/fun/newtype.ts>getOrd

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

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

Examples

Example 1

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

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

const ordInteger = getOrd<Integer>(N.OrdNumber);