« first day (1628 days earlier)      last day (1851 days later) » 

2:24 PM
> Hi, +1 Great answer
Are we trying to cram in all the comment platitudes into one?
 
@Shepmaster AR have make two answers to this question
both not good
your also doesn't do what the OP asking
 
@Stargateur oh? How so?
 
fn scan_something<'a>(xs: &'a [A]) -> impl Iterator<Item = B> + 'a {
    xs.iter().scan(xs.len(), |accum, x| {
        *accum += x.0;
        Some(B(*accum))
    })
}
this doesn't work
you omit one result
I tried something similar to your last solution
didn't make it compile... ^^
 
@Stargateur gotcha. Added a caveat.
@Stargateur I actually expected it to not compile at first.
 
If I understand correctly I tried something with iterator but needed GaT to compile ;)
 
4:13 PM
@Shepmaster I have no strong feeling one way or the other
They should be linked though.
 

« first day (1628 days earlier)      last day (1851 days later) »