Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/eitherway/lib/async/mod.ts>Task#mapOrElse

Yet Another Option and Result Implementation - providing safe abstractions for fallible flows inspired by F# and Rust
Latest
method Task.prototype.mapOrElse
import { Task } from "https://deno.land/x/eitherway@0.10.0/lib/async/mod.ts";

Parameters

mapFn: (v: T) => T2 | PromiseLike<T2>
orFn: (e: E) => T2 | PromiseLike<T2>

Returns

Task<T2, never>