Skip to main content
Module

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

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);

Parameters

ord: Ord<ToValue<T>>