Removes and returns the first element of the collection.
SDK
- Xcode 10.0+
Framework
- Swift Standard Library
Declaration
Return Value
The removed element.
Discussion
The collection must not be empty.
Calling this method may invalidate any existing indices for use with this collection.
Complexity: O(n), where n is the length of the collection.