How to only iterate over a range in an iterator?

So say I have an iterator with 100 items. Now I want to iterate over a range of elements say a range like: 75..98. How can I achieve this?

my_iter.skip(75).take(23)

gives an iterator over the 23 elements starting at index 75.

1 Like

Perfection :star:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.