Skip to main content
Module

x/fun/decoder.ts>of

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 of
import { of } from "https://deno.land/x/fun@v2.0.0-alpha.10/decoder.ts";

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

Examples

Example 1

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

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

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

Type Parameters

A
optional
D = unknown