We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
defer
The case as following, but get 11 instead of 1100. Is this possible?
inner <- function(x, env = parent.frame(1)) { withr::defer(assign("x", get("x", envir = env) * 100, envir = env), env) } outer <- function(x) { inner(x) x <- x + 1 return(x) } outer(10)
The text was updated successfully, but these errors were encountered:
I think it's expected. return() gets the value x eagerly and the on-exit expression runs after return() is called.
return()
x
Sorry, something went wrong.
No branches or pull requests
The case as following, but get 11 instead of 1100. Is this possible?
The text was updated successfully, but these errors were encountered: