Created
November 4, 2019 20:51
-
-
Save juliofalbo/f14875783324a9f412f650278d06fb6a to your computer and use it in GitHub Desktop.
FunctionMethodCompose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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