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

x/fun/mod.ts>flatmappable.createTap

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

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.

Type Parameters

U extends Kind

Returns

<A>(fn: (value: A) => void) => <B = never, C = never, D = unknown, E = unknown>(ua: $<U, [A, B, C], [D], [E]>) => $<U, [A, B, C], [D], [E]>