Pre-RFC: `fold_ok` is composable internal iteration

This hasn’t moved for some reasons, for example christmas, but also that the following does not compile without additional type hints.

It’s more or less so that any nested use of try!() or ? will have this kind of issue.

Hence my quipping some late night that I wanted a try operator that didn’t convert errors, let’s say expr=? for example, that would have to be used inside fold_ok's closure here.

#![feature(fold_ok)]

use std::io::{BufRead, stdin, self};

fn try_main() -> Result<(), io::Error> {
    let s = stdin();
    let r = s.lock();
    let lines = r.lines().fold_ok(Vec::new(), |mut v, line| {
        v.push(line?);
        Ok(v)
    })?;
    println!("lines: {:?}", lines);
    Ok(())
}

fn main() {
    try_main().unwrap();
}