void (String[] args) { System.out.println(Function.<String>identity().andThen((a) -> { String prefix = a; return new Function<String, String>() { @Override public String apply(String b) { return prefix + b; } }; }).apply("a").apply("b")); }