Optional
Readonly
reversedIndicates whether this range will traverse its elements in reverse order.
Readonly
sizeGet how many elements are in this range.
⚠️ This might be an expensive operation, so make sure to cache it if you need frequent access to it.
A range is a well-defined sequence of elements that are part of a collection.
Traversing a range that is being mutated results is undefined behavior (with some exceptions). To be safe, you need to manually make a copy of the elements in the range before adding or removing elements.