2 ms·
For me it's the other way around. With reduce you have to explicitly declare what you're keeping between each iteration. When you have an imperative loop the
by throwawaymaths 3y ago
For me it's the other way around. With reduce you have to explicitly declare what you're keeping between each iteration.
When you have an imperative loop the state of any of the variables youve declared is up in the air. It gets even worse if you've shadowed variable names.