Skip to main content
Module

x/fun/mod.ts>newtype.getCombinable

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function newtype.getCombinable
import { newtype } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { getCombinable } = newtype;

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

Examples

Example 1

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

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

const monoidInteger = getCombinable<Integer>(N.InitializableNumberSum);

Parameters

combinable: Combinable<ToValue<T>>

Returns

Combinable<T>