
f <- function(x,y) {
   z <- x + y
   if (z > 10) {
      z <- g(x,y,z)  
   }
   z  
}

g <- function(x,y,z) {
   tmp <- z - x + y  
   tmp^2
}

