Skip to main content
Module

x/fun/async_either.ts>right

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 right
import { right } 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 Right. Traditionally signaling a successful computation

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.right<number, number>(1);
const result = await computation();

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

Type Parameters

optional
A = never
optional
B = never