Which function is the inverse of the ellipsis?

The ellipsis transforms a vector into a list of function arguments:

(+)([1,2]...) # 3

Is there a function foo that performs the inverse operation:

foo3(x, y, z) = [x, y, z] # for the special case of three arguments

for any number of arguments?

foo(args...) = args

1 Like

Thanks. To return a vector I had to add collect.

foo(args...) = collect(args)

I think tuple does exactly that:

julia> tuple(1,2,3)
(1, 2, 3)