Function toPipe

  • Curries a function so it can be used in a pipe. Functions must have an iterable as a first argument.

    Type Parameters

    • It extends AnyIt<unknown>
    • P extends unknown[]
    • R

    Parameters

    • fn: ((iter, ...args) => R)
        • (iter, ...args): R
        • Parameters

          • iter: It
          • Rest ...args: P

          Returns R

    Returns ((...rest) => ((iter) => R))

      • (...rest): ((iter) => R)
      • Parameters

        • Rest ...rest: P

        Returns ((iter) => R)

          • (iter): R
          • Parameters

            Returns R