fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
    where
        F: FnOnce(Self::Output) -> Fut,
        Fut: Future,
        Self: Sized,
    {
        assert_future::<Fut::Output, _>(Then::new(self, f))
    }
Chain on a computation for when a future finished, passing the result of
the future to the provided closure `f`.

The returned value of the closure must implement the `Future` trait
and can represent some more work to be done before the composed future
is finished.

The closure `f` is only run *after* successful completion of the `self`
future.

Note that this function consumes the receiving future and returns a
wrapped version of it.

# Examples

```
# futures::executor::block_on(async {
use futures::future::FutureExt;

let future_of_1 = async { 1 };
let future_of_4 = future_of_1.then(|x| async move { x + 3 });
assert_eq!(future_of_4.await, 4);
# });
```
futures-util/src/future/future/mod.rs