• Reduces a collection to a value which is the accumulated result of running each element in the collection through the callback, where each successive callback execution consumes the return value of the previous execution. If accumulator is not provided the first element of the collection will be used as the initial accumulator value. The callback is invoked with four arguments: (accumulator, value, index|key, collection).

    Type Parameters

    • T

    • TResult

    Parameters

    • collection: undefined | null | T[]

      The collection to iterate over.

    • callback: MemoListIterator<T, TResult, T[]>

      The function called per iteration.

    • accumulator: TResult

      Initial value of the accumulator.

    Returns TResult

    Returns the accumulated value.

  • Type Parameters

    • T

    • TResult

    Parameters

    • collection: undefined | null | List<T>
    • callback: MemoListIterator<T, TResult, List<T>>
    • accumulator: TResult

    Returns TResult

    See

    _.reduce

  • Type Parameters

    • T extends object

    • TResult

    Parameters

    • collection: undefined | null | T
    • callback: MemoObjectIterator<T[keyof T], TResult, T>
    • accumulator: TResult

    Returns TResult

    See

    _.reduce

  • Type Parameters

    • T

    Parameters

    • collection: undefined | null | T[]
    • callback: MemoListIterator<T, T, T[]>

    Returns undefined | T

    See

    _.reduce

  • Type Parameters

    • T

    Parameters

    • collection: undefined | null | List<T>
    • callback: MemoListIterator<T, T, List<T>>

    Returns undefined | T

    See

    _.reduce

  • Type Parameters

    • T extends object

    Parameters

    • collection: undefined | null | T
    • callback: MemoObjectIterator<T[keyof T], T[keyof T], T>

    Returns undefined | T[keyof T]

    See

    _.reduce

Generated using TypeDoc