In the following code, I want to print the output of fn(a = b) as:
"a = b" and fn(a = gn(b), 3~b~a, dd, e = 2 + f, h = hn(jn(cdf))) to be list("a=gn(b)", "3~b~a", "dd", "e=2+f", "h= hn(jn(cdf)))"
fn = function(...) {
# print the content of ... without evaluation?
}
The closest I got was this:
fn = function(...) {
res = rlang::enexprs(...)
paste0(names(res), ifelse(names(res)=="",names(res) , "=") , sapply(res, capture.output))
}