public static <A, B> Predicate<A> compose(Function<A, ? extends B> function, Predicate<B> predicate) {
        Objects.requireNonNull(function, "function");
        Objects.requireNonNull(predicate, "predicate");
        return input -> predicate.test(function.apply(input));
    }
Returns a predicate which takes the input, passes it through the given
function, and then obtains a result from the delegate predicate.

@param function the function to map the input
@param predicate the predicate to test the result of the mapping
@param <A> the input type
@param <B> the tested type
@return a composed predicate
helper/src/main/java/me/lucko/helper/function/Predicates.java