A lens into the environment of an object. This is the lens version of environment and environment<-

env_l

Format

An object of class lens of length 2.

Examples

x <- 10 f <- (function(){x <- 2; function() x + 1})() f
#> function() x + 1 #> <environment: 0x87ed9c0>
f()
#> [1] 3
view(f, env_l)$x
#> [1] 2
g <- over(f, env_l, parent.env) g()
#> [1] 11