# Extend pattern matching to Array and ArraySlice

**URL:** <https://forums.swift.org/t/extend-pattern-matching-to-array-and-arrayslice/68418>\
**Category:** Pitches\
**Created:** [November 12, 2023, 10:30pm UTC](https://forums.swift.org/t/extend-pattern-matching-to-array-and-arrayslice/68418 "2023-11-12T22:30:13Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![taylorswift](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/taylorswift/32/43413_2.png) [@taylorswift](https://forums.swift.org/u/taylorswift)\
**Post date:** [November 13, 2023, 9:42pm UTC](https://forums.swift.org/t/extend-pattern-matching-to-array-and-arrayslice/68418/11 "2023-11-13T21:42:06Z")

</div>

> [@jeremyabannister](#):
>
> I personally have `Collection.only` defined in a package I own and I use it all the time.

what if you start a second package, and that package also has a `Collection.only` extension? then anyone (including future you) who wants to depend on modules from both packages simultaneously will be unable to use either helper method.

---

_[View the full topic](https://forums.swift.org/t/extend-pattern-matching-to-array-and-arrayslice/68418)._
