Hello,
This makes an infinite recursive loop
f <- function(a = "a", b = "b") format(as.list(environment()))
f <- partial(f, b = "c")
f()
It would be nice to be able to force f inside of partial to avoid this. Something like:
partial2 <- function(fun, ..., .lazy = FALSE) {
new_args <- if (.lazy)
eval(substitute(alist(...)))
else
list(...)
formals(fun) <- modifyList(formals(fun), new_args, TRUE)
fun
}
f <- function(a = "a", b = "b") as.list(environment())
f <- partial2(f, b = "c")
f()
Hello,
This makes an infinite recursive loop
It would be nice to be able to force
finside of partial to avoid this. Something like: