Maps and flattens the hom with fn.
fn
The mapped hom X => B.
X => B
import { assertEquals } from "../deps.ts";import { flatMap } from "./func.ts";const mapper = flatMap<number>()((x: number) => (y: number) => x * y);assertEquals(mapper((x) => x + 1)(3), 12); Copy
import { assertEquals } from "../deps.ts";import { flatMap } from "./func.ts";const mapper = flatMap<number>()((x: number) => (y: number) => x * y);assertEquals(mapper((x) => x + 1)(3), 12);
Generated using TypeDoc
Maps and flattens the hom with
fn
.