AnyCollection

A type-erased wrapper over any collection with indices that support forward traversal.

@frozen struct AnyCollection<Element>

An AnyCollection instance forwards its operations to a base collection having the same Element type, hiding the specifics of the underlying collection.