Skip to main content
Module

x/fun/mod.ts>decoder.leafErr

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

Construct a Lead from an unknown value and a reason for the decode error.

Examples

Example 1

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

const result = D.leafErr(1, "expected string");

Parameters

value: unknown
reason: string