@cprecioso/async-iterable-helpers
    Preparing search index...

    Function scan

    • Runs fn as a running accumulation over the source, yielding the accumulator after each item. Like a reduce that emits every intermediate result. The reducer may be async; its result is awaited before being yielded.

      Type Parameters

      • T
      • U

      Parameters

      • fn: (acc: U, item: Awaited<T>) => U | Promise<U>

        Combines the current accumulator with an item to produce the next.

      • initial: U

        The starting accumulator value.

      Returns PipeFn<T, Awaited<U>>

      A pipe that yields the accumulator after each item.