> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/ios/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/ios/features/destructuring.md).

# Destructuring

{% tabs %}
{% tab title="code" %}

```swift
var tuple = ("Text", 10)
func foo(a:String, b:Int) {}

// ⭐️ tuple splat syntax
foo(tuple)            // ❌ deprecated in Swift 2.2



// ⭐️ array.map()
[(1,2)].map(max)      // ✅ [2]
```

{% endtab %}

{% tab title="📗 參考" %}

{% endtab %}

{% tab title="📘 手冊" %}

{% endtab %}

{% tab title="🗣 討論" %}

* [Destructuring tuple of tuple in closure](https://stackoverflow.com/questions/37358171/destructuring-tuple-of-tuple-in-closure)
* swift-evolution ⟩ [Remove implicit tuple splat behavior from function applications](https://github.com/apple/swift-evolution/blob/master/proposals/0029-remove-implicit-tuple-splat.md)
  {% endtab %}

{% tab title="👥 相關" %}

* [Variadic Parameter](/ios/features/variadic-parameter.md)
  {% endtab %}
  {% endtabs %}
