I would like to pass the same argument to several nested functions. For example, given 2 functions:
fun1 = function(x){x^2}
fun2 = function(x,FUN,...) { x + FUN(...) }
I would like to implement something like this:
fun2(x=10,FUN=fun1) ## this returns error
In this example, I would like to get an output of 10 + 10^2 = 110
I have seen this answered question: Passing arbitrary arguments to multiple nested functions in R but I specifically wish to pass the same argument to multiple nested functions.