Hacker News new | ask | show | jobs
by saagarjha 2471 days ago
C++ even calls it std::accumulate. (There’s a std::reduce in C++17, but it’s just std::accumulate with the restriction that the operation is commutative.)