Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/mod.ts>either.tryCatch

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

Type Parameters

E
A
AS extends unknown[]

Parameters

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

Returns

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