Skip to main content
Module

x/fun/mod.ts>async_either.match

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

Fold away the inner Either from the AsyncEither leaving us with the result of our computation in the form of a Async

Type Parameters

optional
L = unknown
optional
R = unknown
optional
B = never

Parameters

onLeft: (left: L) => B
onRight: (right: R) => B

Returns

(ta: AsyncEither<L, R>) => Async<B>