Of course. But if you want last(), why not just spell the utility function as I did? [...]
That works fine for any iteratable (including a list, array, etc), whether or not it's a reduction/accumulation.
Not if there's enough information to create the last value. Perhaps on the it = iter(range(9999999)) one can get 2 values (call next(it) twice) and use its __length_hint__ to create the last value. But I think only sequences should have such an optimization, not iterators.Consuming the iterator is *necessary* to get the last item. There's no way around that.