Unlike how we use the term, a subsequence is a not-necessarily contiguous, but still in-order, subset of elements. What we call a SubSequence
is a substring under that article's philosophy. (And the "substring" term applies to any sequence-set, not just a String
or other sequence of characters.) Maybe we could use "DiscontiguousIndices
," or "SomeIndices
"?
We could make a lazy
version of indices(where:)
, but the implementation wouldn't be that different from RangeSet
(or whatever we rename it), so I'm not sure it's worth it.
I didn't see it either. But it should be the same as Index
; a generated index value is valid until a RangeReplaceableCollection
method is applied to the source collection (even if that operation's target doesn't specifically include your retained index).