title: Prolog - Palindrome Functor
body: <p>I am trying to write a predicate <code>palindrome/1</code> in Prolog that is true if and only if its list input consists of a palindromic list.</p>
  
  <p>for example: </p>
  
  <pre><code>?- palindrome([1,2,3,4,5,4,3,2,1]).
  </code></pre>
  
  <p>is true.</p>
  
  <p>Any ideas or solutions?</p>