Parameters
- record: Readonly<Record<string, readonly T[]>>
- reducer: ((accumulator: A, current: T) => A)
- (accumulator, current): A
Returns A
- initialValue: A
Returns Record<string, A>
A record with the same keys as the input grouping, where each value
is the result of applying the reducer to the respective group.
Applies the given reducer to each group in the given grouping, returning the results together with the respective group keys.