title: How can I apply to functions to a list in haskell?
body: <p>I'm trying to write a function that checks whether or not a given list is a palindrome. However, I can't figure out how to apply to functions to a given input.
  My Code looks like this:</p>
  <pre><code>isPalindrome :: [a] -&gt; Bool
  isPalindrome x
    | head x == last x = True
    | otherwise = isPalindrome tail (init x)
  </code></pre>
  <p>This doesn't work and I cant figure out why.</p>