TLDR · QUICK LINKS
PUSH IFS UP AND FORS DOWN
Summary from the TLDR newsletter
Consider moving if conditions inside functions to the caller instead, and if you have a whole batch of things to work with, you can amortize the startup cost and be flexible about the order things are processed.