- reduceRight<T>(array, iteratee): IfCouldBe<T, Nil, undefined> | NonNullable<T>[number]
Type Parameters
- T extends readonly any[] | Nil
Parameters
- array: T
- iteratee: ((accumulator, value, index) => NonNullable<T>[number])
- (accumulator, value, index): NonNullable<T>[number]
Parameters
- accumulator: NonNullable<T>[number]
- value: NonNullable<T>[number]
- index: number
Returns NonNullable<T>[number]
Returns IfCouldBe<T, Nil, undefined> | NonNullable<T>[number]
- reduceRight<E, A>(array, iteratee, accumulator): A
Parameters
- array: Nil | readonly E[]
- iteratee: ((accumulator, value, index) => A)
- (accumulator, value, index): A
Parameters
- accumulator: A
- value: E
- index: number
Returns A
- accumulator: A
Returns A
- reduceRight<T>(object, iteratee): IfCouldBe<T, Nil, undefined> | NonNullable<T>[keyof NonNullable<T>]
Parameters
- object: T
- iteratee: ((accumulator, value, key) => NonNullable<T>[keyof NonNullable<T>])
- (accumulator, value, key): NonNullable<T>[keyof NonNullable<T>]
Parameters
- accumulator: NonNullable<T>[keyof NonNullable<T>]
- value: NonNullable<T>[keyof NonNullable<T>]
- key: keyof NonNullable<T>
Returns NonNullable<T>[keyof NonNullable<T>]
Returns IfCouldBe<T, Nil, undefined> | NonNullable<T>[keyof NonNullable<T>]
- reduceRight<T, A>(object, iteratee, accumulator): A
Parameters
- object: T
- iteratee: ((accumulator, value, key) => A)
- (accumulator, value, key): A
Parameters
- accumulator: A
- value: NonNullable<T>[keyof NonNullable<T>]
- key: keyof NonNullable<T>
Returns A
- accumulator: A
Returns A
This function is like
_.reduce
except that it iterates over elements ofcollection
from right to left.Contribution to minified bundle size, when it is the only function imported: