Would be an option, but wouldn't improve performance.
You could use reduce() instead: stackoverflow.com/questions/24...
Or use a normal loop.
> Or use a normal loop.
i was waiting for someone to say that
you don't have a function that needs to do two things, you have two distinct problems to solve and a stack of code that hides bugs and performance issues
1 8Samuel
@samuel.fm
That is the correct criticism yep. would’ve sidestepped this bug completely
1 2