Function exclusiveScan

  • Perform exclusive prefix scan from left to right.

    Type Parameters

    • T

    • U = T

    Parameters

    • x: T[]

      an array

    • fr: ReduceFunction<T, T | U>

      reduce function (acc, v, i, x)

    • acc: T | U

      initial value

    Returns (T | U)[]

    [acc, fr(acc, v₀), fr(fr(acc, v₀), v₁)...]

Generated using TypeDoc