Generic Initializer

init(_:)

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

Declaration

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

Parameters

base

The collection to wrap.

Discussion

Complexity: O(1).