Values & References5 / 8
Up next

Superassignment <<-

counter <- 0
bump <- function() {
  # <<- assigns in the enclosing (here global) scope
  counter <<- counter + 1
}
bump()
bump()
print(counter)
What you're solving

assign in an enclosing scope