Function reduce

  • Reduce values of iterable to a single value.

    Type Parameters

    • T

    • U

    Parameters

    • x: Iterable<T>

      an iterable

    • fr: ReduceFunction<T, U>

      reduce function (acc, v, i, x)

    • Optional acc: U

      initial value

    Returns U

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

Generated using TypeDoc