4 ms·
What's Wrong with a for Loop?
- theamk 4y ago> Because they're less powerful than a for loop, it's less conceptual work to figure out what they're doing while your transformation is simple, sure. But then you want to implement some pretty reasonable changes ("different separator on alternate lines", "skip separator between two items of the same type") and your nice chain becomes a crazy mix of flat_maps and temporary objects that are more complex and harder to understand than the original "for" statement.