import Test.QuickCheck

isPalindrome :: String -> Bool
isPalindrome x = x == reverse x


instance Arbitrary Char where
  arbitrary = choose ('\32', '\127')





main = do 
  putStr "Even palindromes: " >> quickCheck (\s   ->                  isPalindrome (s ++ reverse s))
  putStr "Odd palindromes:  " >> quickCheck (\s   -> not (null s) ==> isPalindrome (s ++ (tail.reverse) s))
  putStr "Non-palindromes:  " >> quickCheck (\i s -> not (null s) && 0 <= i && i < length s && i*2 /= length s
                                                                  ==> not (isPalindrome (take i s ++ "" ++ drop i s)))