> 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/swift/pattern-matching.md).

# Pattern Matching

{% tabs %}
{% tab title="🔴 主題" %}

* [operator (\~=)](/ios/swift/pattern-matching/operator.md)
* [enum case pattern](/ios/swift/pattern-matching/enum-case-pattern.md)
  {% endtab %}

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

* [x] Erica ⟩ [Challenge: Filtering associated value enumeration arrays](https://ericasadun.com/2017/01/31/challenge-filtering-associated-value-enumeration-arrays/)
* [x] Austin Zheng ⟩ [Custom pattern matching in Swift](http://austinzheng.com/2014/12/17/custom-pattern-matching/) - custom array matching
* [x] Ole ⟩ [Pattern Matching in Swift](https://oleb.net/blog/2015/09/swift-pattern-matching/) - generic \~= operator
* [ ] AliSoftware ⟩ Pattern Matching&#x20;
  * [x] [Part 1: switch, enums & where clauses](https://alisoftware.github.io/swift/pattern-matching/2016/03/27/pattern-matching-1/)
  * [x] [Part 2: tuples, ranges & types](https://alisoftware.github.io/swift/pattern-matching/2016/03/30/pattern-matching-2/)&#x20;
  * [ ] [Part 3: Custom pattern matching & syntactic sugar](https://alisoftware.github.io/swift/pattern-matching/2016/04/24/pattern-matching-3/)
  * [ ] [Part 4: if case, guard case, for case](https://alisoftware.github.io/swift/pattern-matching/2016/05/16/pattern-matching-4/) ⭐️
* [ ] Sundell ⟩&#x20;
  * [ ] [pattern matching articles](https://www.swiftbysundell.com/tags/pattern-matching/)
  * [ ] [Pattern matching in Swift](https://www.swiftbysundell.com/articles/pattern-matching-in-swift/) ⟩&#x20;
    * [ ] [Under the hood with custom matching](https://www.swiftbysundell.com/articles/pattern-matching-in-swift/#under-the-hood-with-custom-matching) - pattern match against any kind of `Equatable` Errors.
      {% endtab %}

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

* Swift Ref ⟩ [Patterns](https://docs.swift.org/swift-book/ReferenceManual/Patterns.html) ⟩\
  [wildcard-pattern](https://docs.swift.org/swift-book/ReferenceManual/Patterns.html#grammar_wildcard-pattern), [identifier-pattern](https://docs.swift.org/swift-book/ReferenceManual/Patterns.html#grammar_identifier-pattern), [value-binding-pattern](https://docs.swift.org/swift-book/ReferenceManual/Patterns.html#grammar_value-binding-pattern),  [tuple-pattern](https://docs.swift.org/swift-book/ReferenceManual/Patterns.html#grammar_tuple-pattern), [enum-case-pattern](https://docs.swift.org/swift-book/ReferenceManual/Patterns.html#grammar_enum-case-pattern), [optional-pattern](https://docs.swift.org/swift-book/ReferenceManual/Patterns.html#grammar_optional-pattern), [type-casting-pattern](https://docs.swift.org/swift-book/ReferenceManual/Patterns.html#grammar_type-casting-pattern), [expression-pattern](https://docs.swift.org/swift-book/ReferenceManual/Patterns.html#grammar_expression-pattern).
  {% endtab %}

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

* [operator (\~=)](/ios/swift/pattern-matching/operator.md) - pattern matching operator
* [Mirror](/ios/swift/debugging/mirror.md)
* [Mirror.handleChildren()](/ios/swift/debugging/mirror/mirror.handlechildren.md) - use pattern matching on [mirror](/ios/swift/debugging/mirror.md)'s children.
  {% endtab %}
  {% endtabs %}
