// "Create method 'nextFn'" "true-preview" import java.util.function.Function; class X { void x() { Function fn1 = d -> String.valueOf(d) .charAt(0); Function fn = fn1.andThen(nextFn()); } }