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

createTap

import { createTap } from "https://raw.githubusercontent.com/baetheus/fun/main/flatmappable.ts";

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.

function createTap<U extends Kind>({ wrap, flatmap }: Flatmappable<U>): <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]>;
§
createTap<U extends Kind>({ wrap, flatmap }: Flatmappable<U>): <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]>
[src]

§Type Parameters

§
U extends Kind
[src]

§Parameters

§
{ wrap, flatmap }: Flatmappable<U>
[src]

§Return Type

§
<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]>
[src]