Skip to main content
Module

x/fun/mod.ts>decoder.id

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

Create a Decoder<D, D> from a type D.

Examples

Example 1

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

const num = D.id<number>();

const result1 = num(1); // Right(1)

Type Parameters

optional
D = unknown