CDISP0466E

The function name function must be declared to be stateful because it calls the function name function, which is stateful.

A function that calls a stateful function must also be marked as stateful.
Mark the function as stateful, or remove the call to the stateful function.