es-stl - v3.0.2
    Preparing search index...

    Interface ReduceCallback<V, K, T>

    Reducer callback used by iterator helpers.

    const sum: ReduceCallback<number, number, number> = (total, value) =>
    total + value;

    Type Parameters

    • V

      Iterated value type.

    • K

      Iterated key type.

    • T

      Accumulator type.

    • Reduces one iterated value into the accumulator.

      Parameters

      • pre: T

        Previous accumulator value.

      • v: V

        Current value.

      • k: K

        Current key.

      • i: number

        Zero-based iteration index.

      • length: number

        Total number of values in the traversal.

      Returns T

      Next accumulator value.