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

Usage

import * as fun from "https://raw.githubusercontent.com/baetheus/fun/main/flatmappable.ts";

Flatmappable is a structure that allows a function that returns the concrete structure to be applied to the value inside of the same type of concrete structure. The resultant nested structure is then flattened.

§Functions

createBind

Create a bind function for a structure with instances of Mappable and Flatmappable. A bind function allows one to flatmap into named fields in a struct, collecting values from the result of the flatmap in the order that they are completed.

createFlatmappable

Derive a Flatmappable instance from unwrap, flatmap, and a Kind. This is the simplest way to get a Flatmappable instance.

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

Flatmappable

A Flatmappable structure.

§Type Aliases

Bind

The return type for the createBind function on Flatmappable. Useful to reduce type inference in documentation.

Tap

The return type for the createTap function on Flatmappable. Useful to reduce type inference in documentation.