Skip to content

Instantly share code, notes, and snippets.

@juliofalbo
Created November 4, 2019 20:51
Show Gist options
  • Save juliofalbo/f14875783324a9f412f650278d06fb6a to your computer and use it in GitHub Desktop.
Save juliofalbo/f14875783324a9f412f650278d06fb6a to your computer and use it in GitHub Desktop.
FunctionMethodCompose
default <V> Function<V, R> compose(Function<? super V, ? extends T> before) {
Objects.requireNonNull(before);
return (V v) -> apply(before.apply(v));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment