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

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

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