Say I have some complicated function that, through subsequent nested function calls, can potentially call itself, is there an accepted method to prevent this recursive call in the case where it is undesirable?
e.g.:
function h()
{
if(someOtherState)
f(); // uh-oh
}
function g()
{
if(someState)
h();
}
function f()
{
g();
}