import { getMonoid } from "https://deno.land/x/fun@v2.0.0-alpha.6/newtype.ts";
Retype an existing Monoid from an inner type to a Newtype.
Examples
Example 1
Example 1
import { Newtype, getMonoid } from "./newtype.ts";
import * as N from "./number.ts";
type Integer = Newtype<'Integer', number>;
const monoidInteger = getMonoid<Integer>(N.MonoidNumberSum);
Type Parameters
T extends AnyNewtype