I don't think this is possible, but hey you never know. I'm curious if this is possible to do in common languages. My examples will be in JavaScript, but I'd be curious to know if this can be done in Python, PHP, Java, etc.
Let's say there are two functions.
var printX = function(x){
checkX(x, this);
console.log(x);
}
var checkX = function(x, caller){
if (x > 10){
caller.return;
}
}
printX(5); //Prints 5
printX(15); //Doesn't print anything
Obviously there are much better ways of expressing this, I'd just like to know if the concept is possible.