# Which function is the inverse of the ellipsis?

**URL:** https://discourse.julialang.org/t/which-function-is-the-inverse-of-the-ellipsis/80459
**Category:** General Usage
**Tags:** question
**Created:** [May 4, 2022, 3:36am UTC](https://discourse.julialang.org/t/which-function-is-the-inverse-of-the-ellipsis/80459 "2022-05-04T03:36:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)
#### Post date: [May 4, 2022, 3:36am UTC](https://discourse.julialang.org/t/which-function-is-the-inverse-of-the-ellipsis/80459/1 "2022-05-04T03:36:39Z")

</div>

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

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

```

Is there a function `foo` that performs the inverse operation:

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

```

for any number of arguments?

---

<div class="post-metadata">

### Author: ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)
#### Post date: [May 4, 2022, 3:42am UTC](https://discourse.julialang.org/t/which-function-is-the-inverse-of-the-ellipsis/80459/2 "2022-05-04T03:42:38Z")

</div>

`foo(args...) = args`

---

<div class="post-metadata">

### Author: ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)
#### Post date: [May 4, 2022, 3:49am UTC](https://discourse.julialang.org/t/which-function-is-the-inverse-of-the-ellipsis/80459/3 "2022-05-04T03:49:44Z")

</div>

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

```julia
foo(args...) = collect(args)

```

---

<div class="post-metadata">

### Author: ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)
#### Post date: [May 5, 2022, 7:26am UTC](https://discourse.julialang.org/t/which-function-is-the-inverse-of-the-ellipsis/80459/4 "2022-05-05T07:26:33Z")

</div>

> [@Oscar\_Smith](#):
>
> foo(args…) = args

I think `tuple` does exactly that:

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

```
