Bertrand Meyer suggested you split the code for making a decision and the code for acting on it into separate methods. Happens to work pretty well for writing unit tests, too.
If I don’t edit your function, it’s harder for me to screw it up. You can segregate code without pulling it out into an interpreter.