#last entry in an iterator
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
Is there a convenient way to get the final thing in an iterator?
There isn't.
Iterators are designed solely with the intent of iterating, and getting the last item is kinda not part of that idea.
The only iterator that has this property is the reverse iterator which goes backwards on slices