Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/mappable.ts

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
import * as fun from "https://deno.land/x/fun@v2.0.0/mappable.ts";

Mappable is a structure that allows a function to be applied inside of the associated concrete structure.

Functions

Create a bindTo function from a structure with an instance of Mappable. A bindTo function takes the inner value of the structure and maps it to the value of a struct with the given name. It is useful for lifting the value such that it can then be used with a bind function, effectively allowing for Do-like notation in typescript.

Interfaces

A Mappable structure has the method map.