shawwn / wiki

Research wiki
https://www.shawwn.com
51 stars 8 forks source link

Remove huge redundant nesting in staticImg #4

Open singpolyma opened 5 years ago

singpolyma commented 5 years ago

Just something that jumped out at me while reading the codebase. This is not the only way to rewrite this (nor is it a complete refactoring, just a simple improvement) and the "right way" will depend on taste, but this is certainly a way to write an equivalent function with much less deep nesting going on.