Function accumulate

  • Produce accumulating values.

    Type Parameters

    • T

    • U = T

    Parameters

    • x: Iterable<T>

      an iterable

    • fr: ReduceFunction<T, T | U>

      reduce function (acc, v, i, x)

    • Optional acc: T | U

      initial value

    Returns IterableIterator<T | U>

    fr(acc, v₀), fr(fr(acc, v₀), v₁), ... | fr(acc, v₀) = v₀ if acc not given

Generated using TypeDoc