Function reduceRight

  • Reduce values from right, to a single value.

    Type Parameters

    • T

    • U = T

    Parameters

    • x: T[]

      an array

    • fr: ReduceFunction<T, T | U>

      reduce function (acc, v, i, x)

    • Optional acc: T | U

      initial value

    Returns T | U

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

Generated using TypeDoc