Type alias ReduceFunction<T, U>

ReduceFunction<T, U>: ((acc, v, i, x) => U)

Type Parameters

  • T

  • U

Type declaration

    • (acc, v, i, x): U
    • Handle reduction of multiple values into a single value.

      Parameters

      • acc: U

        accumulator (temporary result)

      • v: T

        value in array

      • i: number

        index of value in array

      • x: T[]

        array containing the value

      Returns U

      reduced value

Generated using TypeDoc