2 ms·
> every cycle creates an anonymous function No, that's not how it works. The function is evaluated once before the call and passed as an argument, then interna
by kolme 2y ago
> every cycle creates an anonymous function
No, that's not how it works. The function is evaluated once before the call and passed as an argument, then internally reused.
Also, you're microptimizing. Prioritizing supposed performance over readability.
And yes, for-loops and mutable structures are more error prone than map-filter-reduce. The original is OK but could be better.
- azangru 2y ago> No, that's not how it works. The function is evaluated once before the call and passed as an argument, then internally reused. Yes, sorry; you are right of course.