this may seem like a overly complicated question, but it has me driving me a little nuts for some time. It is also for curiosity, because I already have a way of doing what
Just convert the current environment into a list:
foo <- function(a=1, b=5, h='coconut') { as.list(environment()) } foo(a = 0, h = 'mango')