Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.
Go to Latest
function wrap
import { wrap } from "https://deno.land/x/fun@v2.0.0-alpha.12/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