Skip to main content
Module

x/fun/either.ts>tryCatchWrap

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

Type Parameters

E
A
AS extends unknown[]

Parameters

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

Returns

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