Form composite function $f(f(x))$ (#349)