default<V>Function<V, R>compose(Function<? super V, ? extends T>before) { Objects.requireNonNull(before); return(V v)-> apply(before.apply(v)); } Function<Integer, Integer> func = e -> {return e + 5;}; Function<Integer, Integer> func2 = e -> {return e * 5;}; //func2即after func.andThen(func2).apply(5); // 50 default <V> Function<T, V> andThen(Function<? super R, ? extends V> after) { Objects.requireNonNull(after); return (T t) -> after.apply(apply(t)); } Function<Integer, Integer> func = e -> {return e + 5;}; Function<Integer, Integer> func2 = e -> {return e * 5;}; //func2即before func.compose(func2).apply(5); // 30