module Palindrome where

isPalindromeInt :: (Show a, Num a) => a -> Bool
isPalindromeInt = isPalindromeString . show

isPalindromeString :: String -> Bool
isPalindromeString []  = True
isPalindromeString [_] = True
isPalindromeString xs  = head xs == last xs && (isPalindromeString . tail . init $ xs)
