• 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;
    }

      • <U>(f): ((acc: U) => U)
      • Type Parameters

        • U

        Parameters

        • f: ((acc: U, elem: unknown) => U | Reduced<U>)
            • (acc, elem): U | Reduced<U>
            • Parameters

              • acc: U
              • elem: unknown

              Returns U | Reduced<U>

        Returns ((acc: U) => U)

          • (acc): U
          • Parameters

            • acc: U

            Returns U

      • <U>(__, acc): ((f: ((acc: U, elem: unknown) => U | Reduced<U>)) => U)
      • Type Parameters

        • U

        Parameters

        • __: Placeholder
        • acc: U

        Returns ((f: ((acc: U, elem: unknown) => U | Reduced<U>)) => U)

          • (f): U
          • Parameters

            • f: ((acc: U, elem: unknown) => U | Reduced<U>)
                • (acc, elem): U | Reduced<U>
                • Parameters

                  • acc: U
                  • elem: unknown

                  Returns U | Reduced<U>

            Returns U

      • <U>(f, acc): U
      • Type Parameters

        • U

        Parameters

        • f: ((acc: U, elem: unknown) => U | Reduced<U>)
            • (acc, elem): U | Reduced<U>
            • Parameters

              • acc: U
              • elem: unknown

              Returns U | Reduced<U>

        • acc: U

        Returns U