Skip to main content
Module

x/fun/either.ts>tryCatch

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function tryCatch
import { tryCatch } from "https://deno.land/x/fun@v2.0.0/either.ts";

Type Parameters

E
A
AS extends unknown[]

Parameters

fn: (...as: AS) => A
onError: (e: unknown) => E

Returns

(...as: AS) => Either<E, A>