# NOT RUN {
functionA <- functionB <- function() {
curFn <- curfnfinder();
if (curFn == 'functionA') {
cat('Doing something\n');
} else {
cat('Doing something else\n');
}
cat('Doing something generic.');
}
functionA();
functionB();
# }
Run the code above in your browser using DataLab