Skip to main content
Module

x/fun/decoder.ts>wrap

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

Create a Decoder<D, A> from a constant value A.

Examples

Example 1

import * as D from "./decoder.ts";

const one = D.wrap("one");

const result = one(null); // Right("one")

Type Parameters

A
optional
D = unknown