Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/mod.ts>async_either.left

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

Constructs a AsyncEither from a value and wraps it in an inner Left. Traditionally signaling a failure

import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
import * as TE from "./async_either.ts";
import * as E from "./either.ts";

const computation = TE.left<number, number>(1);
const result = await computation();

assertEquals(result, E.left(1));

Type Parameters

optional
A = never
optional
B = never