map_prop_reduce(prop, reducer, acc, list): { <U>(f: ((acc: U, elem: unknown) => U | Reduced<U>)): ((acc: U) => U); <U>(__: Placeholder, acc: U): ((f: ((acc: U, elem: unknown) => U | Reduced<U>)) => U); <U>(f: ((acc: U, elem: unknown) => U | Reduced<U>), acc: U): U; }
Given a list of objects, extract property 'prop' from each object
to create a new list, and then reduce this list with the given
reducer and initial accumulator
Parameters
prop: string
The property to extract
reducer: any
The reducer to use
acc: any
The initiall acc value
list: any[]
The list to act upon
Returns { <U>(f: ((acc: U, elem: unknown) => U | Reduced<U>)): ((acc: U) => U); <U>(__: Placeholder, acc: U): ((f: ((acc: U, elem: unknown) => U | Reduced<U>)) => U); <U>(f: ((acc: U, elem: unknown) => U | Reduced<U>), acc: U): U; }
Given a list of objects, extract property 'prop' from each object to create a new list, and then reduce this list with the given reducer and initial accumulator