fun <- function(x = 1, y = 2, w = 3){ tmp <- x + y tmp2 <- y + w tmp3 <- x + w ans <- list(res1 = tmp, res2 = tmp2, res3 = tmp3) ans }