class DeferredResult {

    public <U> DeferredResult<U> thenCompose(Function<? super T, ? extends DeferredResult<U>> fn) {
        return wrap(this.completableFuture.thenCompose(fn.andThen(p -> p.toCompletionStage())));
    }

    public  DeferredResult();
    public  DeferredResult(CompletableFuture<T> completableFuture);

}