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.
Compiler Explorer link: https://compiler-explorer.com/z/7cfsxoe9M