``` R with_something <- function(get, set) { function(new, code) { old <- get() set(new) on.exit(set(old)) force(code) } } with_locale with_env with_libpaths with_options with_par in_dir ```