• Compose a series of single-argument functions/operators in application order. (This is basically a deferred version of pipe().) For example:

    const func = compose(skip(1), take(2), map(x => x*2));
    const stream_4_6 = func(fromIterable([1,2,3,4])); // stream that outputs 4, 6

    As with pipe(), the declared typings only support composing up to 9 functions at once; if you need more you'll need to nest calls to compose() (i.e. passing the result of a compose() as an argument to another compose() call.)

    Type Parameters

    • A
    • B
    • C
    • D
    • E
    • F
    • G
    • H
    • I
    • J

    Parameters

    • Rest ...fns: [((v: A) => B), ((v: B) => C), ((v: C) => D), ((v: D) => E), ((v: E) => F), ((v: F) => G), ((v: G) => H), ((v: H) => I), ((v: I) => J)]

    Returns ((a: A) => J)

    A function taking the same type as the first input function, returning the same type as the last input function.

      • (a: A): J
      • Parameters

        Returns J

  • Type Parameters

    • A
    • B
    • C
    • D
    • E
    • F
    • G
    • H
    • I

    Parameters

    • Rest ...fns: [((v: A) => B), ((v: B) => C), ((v: C) => D), ((v: D) => E), ((v: E) => F), ((v: F) => G), ((v: G) => H), ((v: H) => I)]

    Returns ((a: A) => I)

      • (a: A): I
      • Parameters

        Returns I

  • Type Parameters

    • A
    • B
    • C
    • D
    • E
    • F
    • G
    • H

    Parameters

    • Rest ...fns: [((v: A) => B), ((v: B) => C), ((v: C) => D), ((v: D) => E), ((v: E) => F), ((v: F) => G), ((v: G) => H)]

    Returns ((a: A) => H)

      • (a: A): H
      • Parameters

        Returns H

  • Type Parameters

    • A
    • B
    • C
    • D
    • E
    • F
    • G

    Parameters

    • Rest ...fns: [((v: A) => B), ((v: B) => C), ((v: C) => D), ((v: D) => E), ((v: E) => F), ((v: F) => G)]

    Returns ((a: A) => G)

      • (a: A): G
      • Parameters

        Returns G

  • Type Parameters

    • A
    • B
    • C
    • D
    • E
    • F

    Parameters

    • Rest ...fns: [((v: A) => B), ((v: B) => C), ((v: C) => D), ((v: D) => E), ((v: E) => F)]

    Returns ((a: A) => F)

      • (a: A): F
      • Parameters

        Returns F

  • Type Parameters

    • A
    • B
    • C
    • D
    • E

    Parameters

    • Rest ...fns: [((v: A) => B), ((v: B) => C), ((v: C) => D), ((v: D) => E)]

    Returns ((a: A) => E)

      • (a: A): E
      • Parameters

        Returns E

  • Type Parameters

    • A
    • B
    • C
    • D

    Parameters

    • Rest ...fns: [((v: A) => B), ((v: B) => C), ((v: C) => D)]

    Returns ((a: A) => D)

      • (a: A): D
      • Parameters

        Returns D

  • Type Parameters

    • A
    • B
    • C

    Parameters

    • Rest ...fns: [((v: A) => B), ((v: B) => C)]

    Returns ((a: A) => C)

      • (a: A): C
      • Parameters

        Returns C

  • Type Parameters

    • A
    • B

    Parameters

    • Rest ...fns: Chain1<A, B>

    Returns ((a: A) => B)

      • (a: A): B
      • Parameters

        Returns B

  • Type Parameters

    • A

    Returns ((a: A) => A)

      • (a: A): A
      • Parameters

        Returns A