Hacker News new | ask | show | jobs
by janosch_123 391 days ago
If's to the top as guard statements.

Add asserts to the end of the function too.

Loop's can live in the middle, take as much I/O and compute out of the loop as you can :)