---
title: "init(_:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/anybidirectionalcollection/init(_:)-1hwm5"
---

# init(_:)

Creates an AnyBidirectionalCollection having the same underlying collection as other.

## Declaration

```swift
init?(_ other: AnyCollection<Element>)
```

## Discussion

Discussion If the underlying collection stored by other does not satisfy BidirectionalCollection, the result is nil. note: O(1)
