Pretty simple... Allow parameters starting at n and later to be optional. Maybe it is a number you tick up and down in the CF editor. Better UX might be a draggable line that divides the required and optional parameters.
There are some problems that are best solved with recursion and many times also requiring the transference of state data.
Today people solve these problems by:
- writing sub-functions or front-end-wrappers to their functions; pretty smelly and not very modular
- using global variables to maintain state; finger going down throat
- far worse contrived machines
The caller/user could just see a function like CF_Jersort(listOfValues). During recursion the call pattern might be something like CF_Jersort(listOfValues, stateData)
Yes, I know, people could use this for evil, but we would be no worse off.
Semi-secret hack, legacy references to a custom function still work when you add new parameters to the end of the definition. 'Almost' enabling this capability today.