3 ms·
I lack a good answer other than it didn't occur to me, now I have some code to refactor. Thanks!
by aquariusDue 2y ago
I lack a good answer other than it didn't occur to me, now I have some code to refactor. Thanks!
- maleldil 2y agoFWIW, I've had to write similar code when there's some complex "folding" operation. I use map/filter a lot, but fold/reduce/accumulate always seemed harder to understand than a for loop. I also prefer nested loops rather than nested iterators.