• 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_1>(__: Placeholder, acc: U_1): ((f: ((acc: U_1, elem: unknown) => U_1 | Reduced<U_1>)) => U_1);
        <U_2>(f: ((acc: U_2, elem: unknown) => U_2 | Reduced<U_2>), acc: U_2): U_2;
    }

      • <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_1>(__, acc): ((f: ((acc: U_1, elem: unknown) => U_1 | Reduced<U_1>)) => U_1)
      • Type Parameters

        • U_1

        Parameters

        • __: Placeholder
        • acc: U_1

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

          • (f): U_1
          • Parameters

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

                  • acc: U_1
                  • elem: unknown

                  Returns U_1 | Reduced<U_1>

            Returns U_1

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

        • U_2

        Parameters

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

              • acc: U_2
              • elem: unknown

              Returns U_2 | Reduced<U_2>

        • acc: U_2

        Returns U_2