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

x/fun/mod.ts>failable.createTryAll

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

Create a tryAll function from an instance of Failable. The tryAll function allows the trying any number of Failable structures in order until a non-failed one is found.

Type Parameters

U extends Kind

Parameters

unnamed 0: Failable<U>

Returns

<A, B, C, D, E>(...uas: NonEmptyArray<$<U, [A, B, C], [D], [E]>>) => $<U, [A, B, C], [D], [E]>