Suppose I have an old function,
oldFunction(first, second, third). And, all the arguments are mandatory. I want to deprecate the use of 'second' argument, and also not change the code anywhere in my project.
So I want to create a new function which does exactly the same thing, with only the first and the third argument.
So, I was thinking of wrapping the new function with new signature with old function as the wrapper. How can I possibly do that? Hence I will be able to use the new function with only two arguments, but when called by the old name, will the new function be called ( because it is wrapped )?
How can I possibly do that?