Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Usage

import * as mod from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/failable.ts";

Failable is a compound structure. It represents the idea of failure. As such it includes methods for creating a failed data, providing alternative data, and recovering from a failed state (effectively flatMapping from the failed value).

§Functions

createTap

Create a tap function for a structure with instances of Wrappable and Flatmappable. A tap function allows one to break out of the functional codeflow. It is generally not advised to use tap for code flow but to consider an escape hatch to do things like tracing or logging.

§Interfaces

Failable

A Failable structure is a Flatmappable that allows for alternative instances, failures, and recovery.

§Type Aliases

Tap

The return type of createTap for Failable. Useful for reducing type inference in the docs.