Turned palindrome functions into a function object