iter_over_range
method is provided.
At one hand, vec.iter_over_range(a..b)
is equivalent to vec.iter().skip(a).take(b - a)
. However, the latter requires a
unnecessary next
calls. Since all pinned vectors provide random access to elements, the objective of iter_over_range
is to directly jump to a
and create an iterator from this point on, and hence, avoiding the unnecessary iterations at the beginning.
Also
- vec_range_limits helper method is also provided.