R/base-lenses.R
formals_l.Rd
A lens equivalent of formals and formals<-, allowing you to change the formal arguments of a function. As with body_l you probably shouldn't use this.
formals_l
An object of class lens of length 2.
lens
f <- function(x) x + y + 7 view(f, formals_l)#> $x #> #> g <- set(f, formals_l, list(x = 1, y = 2)) g()#> [1] 10