When I debug step by step this kind of function:
foo <- function(x) {
helper <- function(x) x^2
2 * helper(x)
}
I see that the helper function definition is evaluated each time. Is it the same, when no in debug mode? Is it bad in terms of time execution?