The following protocols are available globally.
This was taken straight from the objc.io book “Advanced Swift.” It’s so damn useful, that I have it made into a standard tool.
It is fast all git-go.
A type that can efficiently “enqueue” and “dequeue” elements. It works on one element at a time. You cannot dequeue groups of elements.See more
public protocol OLEB_Queue
If you conform to this protocol, you get a few basic Sequence attributes for free.
You’ll need to set up a sequence_contents Array (read/write), and set the Element type, and that’s about all.
This also gives you a read-only subscript.
This cannot be applied to enums, as it requires a stored property.See more
public protocol RVS_SequenceProtocol : Sequence