pub fn then<'a, T, U: 'a, E: 'a>( x: Result<T, E>, f: impl FnOnce(T) -> Results<'a, U, E>, ) -> Results<'a, U, E>
If x is an Err, return it as iterator, else apply f to x and return its output.
x
Err
f