• Compose an array of exactly 3 functions from bottom to top (right to left).

    Returns the fallback if x is null or undefined.

    Type Parameters

    • R3

    Parameters

    • fallback: R3

    Returns (<T, R1, R2>(fns) => ((x) => R3))

      • <T, R1, R2>(fns): ((x) => R3)
      • Type Parameters

        • T

        • R1

        • R2

        Parameters

        Returns ((x) => R3)

          • (x): R3
          • Parameters

            • x: T

            Returns R3

    See

    compose2, compose4

    Example

    compose3(['fallback'])([z => [z, z], y => y.toString(), x => x / 2])(42)
    // => ["21", "21"]

    compose3(['fallback'])([z => [z, z], y => y.toString(), x => x / 2])(null)
    // => ["fallback"]

Generated using TypeDoc