#last entry in an iterator

1 messages · Page 1 of 1 (latest)

stray lichen
#

Is there a convenient way to get the final thing in an iterator?

solid stirrup
#

There isn't.

#

Iterators are designed solely with the intent of iterating, and getting the last item is kinda not part of that idea.

unkempt sluice
#

The only iterator that has this property is the reverse iterator which goes backwards on slices