Function reduce

  • Reduce values of entries to a single value.

    Returns

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

    Type Parameters

    • K

    • V

    • W = V

    Parameters

    • x: Lists<K, V>

      lists

    • fr: ReduceFunction<K, V, V | W>

      reduce function (acc, v, k, x)

    • Optional acc: V | W

      initial value

    Returns V | W

Generated using TypeDoc