Daily bit(e) of C++ | std::inclusive_scan, std::exclusive_scan
Daily bit(e) of C++ #455, Reduction algorithms that output partial results: std::inclusive_scan and std::exclusive_scan.
std::inclusive_scan and std::exclusive_scan scan are std::reduce variants that emit each partial result instead of producing a single value.
For inclusive_scan, the first output value already includes the first input element; for exclusive_scan, the first output value is the init value.
Currently, there is no corresponding range algorithm.