public static <T, U, E extends Exception> Memoized<U, E> combine(Memoized<T, ? extends E> inner, Function<T, U> outer, Closer<U, ? extends E> closer) {
        return new Memoized<>(() -> outer.apply(inner.get()), compose(closer, inner::close));
    }
Composes the given memoized with a function taking its output as an argument to produce a new Memoized, with the given closer.
vespajlib/src/main/java/com/yahoo/yolean/concurrent/Memoized.java