This is my current code:
const fn = parameter => {
// if, else ...
fn(X);
};
fn(0);
Now, I can't use this approach as I need to call the function with a parameter and it must be callable recursively.
How to refactor the above arrow function to be immediately invoked and recursively callable?