Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/mod.ts>async_either.fail

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

Construct an AsyncEither<B, A> from a value B.

Examples

Example 1

import * as AE from "./async_either.ts";

const value = AE.fail("Error!");

const result = await value(); // Left("Error!");

Type Parameters

optional
A = never
optional
B = never