An enumeration of the elements of a sequence or collection.
- Xcode 8.0+
- Swift Standard Library
Enumerated is a sequence of pairs (n, x), where ns are consecutive
Int values starting at zero, and xs are the elements of a base sequence.
To create an instance of
enumerated() on a sequence or collection. The following example enumerates the elements of an array.