Hacker News new | ask | show | jobs
by kettro 758 days ago
Well done!

It is exactly the correct approach — especially with the dataset potentially changing at each iteration, treating it as a contiguous sequence of executions is wrong anyways. Plus, you should always strive to reduce state as much as possible.