Reverse the scan of Iterator

Either that, or you can implement your own scan_backwards iterator adapter. It's not a difficult iterator adapter so it could be a good learning experience too. You could implement it for iterators that satisfy DoubleEndedIterator and instead of calling next you can call next_back.

Look at the source here: https://doc.rust-lang.org/src/core/up/src/libcore/iter/mod.rs.html#1552

Edit: Well, now that I think about it, I don't think this would work very well. And is equivalent to just doing .rev().scan and doesn't avoid the fact that you need to ::collect before rev() again. In my mind I was doing this in place on an iterator.