The transform-reduce is a common operation in distributed systems. C++17 added support for a namesake algorithm that offers the transform-reduce pattern for ranges.
The algorithm requires a commutative and associative reduction but offers both single and two-range variants and parallel overloads.
Compiler Explorer link: https://compiler-explorer.com/z/aYxcfT1Kn