As we override more and more
try_fold implementations on iterators, I’ve been thinking that
.next() can always be implemented as
.find(|_| true), or a variety of other equivalent things), so long as
try_fold has been overridden. And it looks like it’s pretty often optimal. Once the paths are folded, things like
Chain look pretty much the same between the two.
So it’d be nice to let people not have to provide an implementation for
next if they have one for
Any thoughts on a nice way to allow that to work? I assume it’ll need language support, since just overriding both is a stack overflow hazard.