---
title: "init(_:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/anycollection/init(_:)-598x3"
---

# init(_:)

Creates an AnyCollection having the same underlying collection as other.

## Declaration

```swift
init(_ other: AnyBidirectionalCollection<Element>)
```

## Discussion

Discussion note: O(1)
