# Splatting arrays to tuples

**URL:** <https://discourse.julialang.org/t/splatting-arrays-to-tuples/80878>\
**Category:** General Usage\
**Created:** [May 11, 2022, 12:04pm UTC](https://discourse.julialang.org/t/splatting-arrays-to-tuples/80878 "2022-05-11T12:04:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CMoebus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cmoebus/32/32857_2.png) [@CMoebus](https://discourse.julialang.org/u/CMoebus)\
**Post date:** [May 11, 2022, 12:04pm UTC](https://discourse.julialang.org/t/splatting-arrays-to-tuples/80878/1 "2022-05-11T12:04:07Z")

</div>

Hi, I want to transpile Scheme scripts into Julia. So I have to convert arrays into tuples and vice versa. Whereas the conversion of arrays into tuple works well with the splatting operator “…” (e.g.: [(:a, :b, :c)…] ==\> [:a, :b, :c] ). The other way round is a bit ugly by using “tuple” (e.g.: tuple([:a, :b, :c]…) ==\> (:a, :b, :c)).  
I would prefer to use an expression similar to the first leaving out “tuple” (e.g.:([:a, :b, :c]…) ==\> (:a, :b, :c)). But that gives an error “syntax: “…” expression outside call …”. Is it possible to modify Julia, so that one can leave out “tuple” ?  
Best, Claus

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [May 11, 2022, 12:20pm UTC](https://discourse.julialang.org/t/splatting-arrays-to-tuples/80878/2 "2022-05-11T12:20:35Z")

</div>

> [@CMoebus](#):
>
> Is it possible to modify Julia, so that one can leave out “tuple” ?

Just add a trailing comma:

```julia
julia> ([3,4,5]...,)
(3, 4, 5)

```

---

<div class="post-metadata">

**Author:** ![CMoebus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cmoebus/32/32857_2.png) [@CMoebus](https://discourse.julialang.org/u/CMoebus)\
**Post date:** [May 11, 2022, 12:44pm UTC](https://discourse.julialang.org/t/splatting-arrays-to-tuples/80878/3 "2022-05-11T12:44:52Z")

</div>

Wow !!! Thanks ! Claus

> **[Learning and Cognitive Systems // University of Oldenburg](https://uol.de/en/lcs)**
>
> Startseite Lehr- und Lernsysteme

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [May 11, 2022, 1:04pm UTC](https://discourse.julialang.org/t/splatting-arrays-to-tuples/80878/4 "2022-05-11T13:04:26Z")

</div>

This is shorter than `tuple([3,4,5]…)` and clear too:

```julia
Tuple([3,4,5])

```
