Composing Two-Arity Functions – Functional-Style Programming
Composing Two-Arity Functions The interface BiFunction<T, U, R> provides the andThen() method for creating compound two-arity functions. Given a two-arity function f and a one-arity function g, the method evaluates the functions as follows: f.andThen(g).apply(x, y) emulates g.apply(f.apply(x, y))—that is, the two-arity function f is executed first and the one-arity function g last. In the … Read moreComposing Two-Arity Functions – Functional-Style Programming