Perl Style: Loop Hoisting
Hoist repeated code out of blocks:Before:
if (...) { X; Y; } else { X; Z; }
After:
X; if (...) { Y; } else { Z; }
Forward to Break Complex Tasks Up
Back to Reduce Complexity (solution)
Up to index
Copyright © 1998, Tom Christiansen All rights reserved.
Tags
Feedback
Something wrong with this article? Help us out by opening an issue or pull request on GitHub