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

# init(_:)

Creates a type-erased collection that wraps the given collection.

## Declaration

```swift
init<C>(_ base: C) where Element == C.Element, C : RandomAccessCollection
```

## Parameters

- `base`: The collection to wrap.

## Discussion

Discussion note: O(1).
