title: Prolog: take a list of two elements, return true if and only if the first element is same as second
body: <p>I'm a newbie prolog programmer, and for an assignment, I have to have a basic program that succeeds if and only if list X is a list of two elements, with the first as the same as the second.</p>
  
  <p>From my view of prolog, programs seem to be pretty small, so I typed this in:</p>
  
  <pre><code>firstPair(x,x).
  </code></pre>
  
  <p>When I run it under swipl, I get this as output:</p>
  
  <pre><code>Syntax error: Operator expected
  </code></pre>
  
  <p>Is there something more that needs to be done?  I thought that if I executed this with say, firstPair(1,2). this would be all it would need to know that it is false.</p>