# \#splat

**URL:** https://discourse.julialang.org/tag/splat/1474.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Does Base.splat have an inverse?](https://discourse.julialang.org/t/does-base-splat-have-an-inverse/138772)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 5\
**Last updated:** [August 12, 2026, 4:12pm UTC](https://discourse.julialang.org/t/does-base-splat-have-an-inverse/138772 "2026-08-12T16:12:24Z")

</div>

Is there a function that inverts splat, in Base, the standard libraries, or a package? As in f((x, y)) = x + y # function takes tuples g(xs...) = f(xs) # let's unsplat manually unsplat(f) = …

---

## [Destructuring of NamedTuple in julia 1.10](https://discourse.julialang.org/t/destructuring-of-namedtuple-in-julia-1-10/129308)

<div class="topic-metadata">

**Author:** [@o314](https://discourse.julialang.org/u/o314)\
**Replies:** 3\
**Last updated:** [May 25, 2025, 2:35pm UTC](https://discourse.julialang.org/t/destructuring-of-namedtuple-in-julia-1-10/129308 "2025-05-25T14:35:13Z")

</div>

I wonder if there is a way to destructure a namedtuple with splatting like this (; a, nt...) = (; a=1, b=2, c=3) where one is expecting to get a = 1 and nt = (; b=2, c=3) setted This forms fails @ home with julia v1.1…

---

## [How to make splat, map and tuples be efficient](https://discourse.julialang.org/t/how-to-make-splat-map-and-tuples-be-efficient/125653)

<div class="topic-metadata">

**Author:** [@garazha-ilya](https://discourse.julialang.org/u/garazha-ilya)\
**Replies:** 3\
**Last updated:** [February 7, 2025, 7:08pm UTC](https://discourse.julialang.org/t/how-to-make-splat-map-and-tuples-be-efficient/125653 "2025-02-07T19:08:29Z")

</div>

Generally I want to make f(g("a"), g("c"), g("k")) with f(map(g, \["a","c","k"\])...) be efficient and don’t generate allocations. And I started experimenting, by creating 3 functions: function foo\_tuple(a,b,c) …

---

## [Splat operator](https://discourse.julialang.org/t/splat-operator/122351)

<div class="topic-metadata">

**Author:** [@martin\_sanchez](https://discourse.julialang.org/u/martin_sanchez)\
**Replies:** 3\
**Last updated:** [November 6, 2024, 8:03pm UTC](https://discourse.julialang.org/t/splat-operator/122351 "2024-11-06T20:03:39Z")

</div>

Going to edit the question: My doubt is why, even when I use the splat operator in a function definition, I can still refer to it as an iterator. To be more concrete: function mysum(args...) sum=0 for i in args …

---

## [Splatting, tuples, vectors](https://discourse.julialang.org/t/splatting-tuples-vectors/111721)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [March 17, 2024, 9:30am UTC](https://discourse.julialang.org/t/splatting-tuples-vectors/111721 "2024-03-17T09:30:08Z")

</div>

I have the following MWE: struct PlotX X Y end function test(X, Y...) len=length(Y) println(len) println(typeof(Y)) PlotX(X, Y) end T = 0:0.1:2pi X = sin.(T) Y = cos.(T) p1 = test(T, X, Y); p2 …

---

## [String splatting inside comprehensions](https://discourse.julialang.org/t/string-splatting-inside-comprehensions/111464)

<div class="topic-metadata">

**Author:** [@cnaak](https://discourse.julialang.org/u/cnaak)\
**Replies:** 11\
**Last updated:** [March 11, 2024, 5:21pm UTC](https://discourse.julialang.org/t/string-splatting-inside-comprehensions/111464 "2024-03-11T17:21:52Z")

</div>

The following excerpt (taken from a julia-1.10.2 REPL) illustrates my question: julia\> src = ("Ab","Cd") ("Ab", "Cd") julia\> \[ "Ab"..., "Cd"... \] 4-element Vector{Char}: 'A': ASCII/Unicode U+0041 (category Lu: Letter,…

---

## [Calling f(a) = f(a) correctly gives StackOverflowError but not f(a...) = f(a)](https://discourse.julialang.org/t/calling-f-a-f-a-correctly-gives-stackoverflowerror-but-not-f-a-f-a/106692)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 17\
**Last updated:** [November 25, 2023, 4:53am UTC](https://discourse.julialang.org/t/calling-f-a-f-a-correctly-gives-stackoverflowerror-but-not-f-a-f-a/106692 "2023-11-25T04:53:34Z")

</div>

I start with this: VERSION == v"1.9.0" f(a::Int64) = nothing Now, If I define this method and call f(1.), I get a StackOverflowError. Makes sense.: f(a) = f(a) @code\_lowered f(1.) # CodeInfo( # 1 ─ %1 = Main.f(a) # └─…
