• Composes two functions sequentially. z = pipe(a)(b)(x) means y = a(x), z = b(y).

    Type Parameters

    • T

    • U

    Parameters

    • firstDo: Fn<T, U>

      The function to do at first.

    Returns (<V>(secondDo) => ((t) => V))

    The composed function.

    Examples

    import { assertEquals } from "../deps.ts";
    import { pipe } from "./func.ts";

    assertEquals(pipe((x: number) => x + 1)((x) => x * 2)(3), 8);
      • <V>(secondDo): ((t) => V)
      • Type Parameters

        • V

        Parameters

        • secondDo: Fn<U, V>

        Returns ((t) => V)

          • (t): V
          • Parameters

            • t: T

            Returns V

Generated using TypeDoc