User blog comment:MilkyWay90/Generalized Factorial Function/@comment-30869823-20180514152631

This is like function itteration so in the fgh F(x,!) is one level higher than F(x,x)  (assuming there aren't any problems like F(x,1)=1 becuase then F(x,!)=1 )

You could define a 3-variable function \( F(a,!,c)=F(a,F(a-1,!,c),c) \) \( F(a,b,!)=F(a,!,F(a-1,b,!)) \) \( F(1,!,c)=F(1,b,!)=1 \)