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

x/fun/async_either.ts>fromAsync

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

Lift an always succeeding async computation (Async) into a AsyncEither.

Examples

Example 1

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

const value = AE.fromAsync(A.wrap(1));

const result1 = await value(); // Right(1)

Type Parameters

A
optional
B = never