4 ms·
In C++? No idea - I think C++ just has an inferiority complex and wants to look cool. In other languages, though, it's pretty neat. For example, in Rust one ju
by Veedrac 11y ago
In C++? No idea - I think C++ just has an inferiority complex and wants to look cool.
In other languages, though, it's pretty neat. For example, in Rust one just does
data.iter().fold(0, |s, e| s + e)