Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public interface Function<T, R> {
R apply(T t);
// default method
default <V> Function<V, R> compose(Function<? super V, ? extends T> before);
default <V> Function<V, T> andThen(Function<? super R, ? extends V> after);
// static method
static <T> Function<T, T> identity() {
return t -> t;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment