Function pipe

  • Creates a pipeline of functions, where the output of each function is passed as input to the next. The pipe starts by receiving an iterable as the first argument.

    Type Parameters

    • It extends AnyIt<unknown>
    • RA

    Parameters

    • value: It

      An iterable or AsyncIterable, like an Array or String.

    • a: ((value) => RA)
        • (value): RA
        • Parameters

          Returns RA

    Returns RA

    Example

    // Returns an Iterable<array> representing ['0', '1', '2', '3', '4']
    const a = it.pipe(
    it.range(5),
    it.map((x) => x.toString()),
    )