Composes two functions sequentially. z = pipe(a)(b)(x) means y = a(x), z = b(y).
z = pipe(a)(b)(x)
y = a(x), z = b(y)
The function to do at first.
The composed function.
import { assertEquals } from "../deps.ts";import { pipe } from "./func.ts";assertEquals(pipe((x: number) => x + 1)((x) => x * 2)(3), 8); Copy
import { assertEquals } from "../deps.ts";import { pipe } from "./func.ts";assertEquals(pipe((x: number) => x + 1)((x) => x * 2)(3), 8);
Generated using TypeDoc
Composes two functions sequentially.
z = pipe(a)(b)(x)
meansy = a(x), z = b(y)
.