# 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](https://lochiwei.gitbook.io/ios/features/variadic-parameter "mention")
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lochiwei.gitbook.io/ios/features/destructuring.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
