The general approach to writing a recursive function:
- Handle the simple cases.
- Simplify the problem and call yourself again.
For a function that returns true/false, there will be 3 conditions: you know the answer is true, you know the answer is false, or the problem is still too complicated.
Take the example of the palindrome. You know it's false if the first character and last character don't match. You know it's true if the length of the string is 1 or less. And since you've already checked the first and last character, you can remove those from the string to simplify the problem.