title: Reversing matrix rows in Prolog
body: <p>I am trying to write a predicate which reverses all rows in a matrix using Prolog.</p>
  <p>For instance the matrix [ [1,2,3], [4,5,6], [7,8,9] ] should become [ [3,2,1], [6,5,4], [9,8,7] ].</p>
  <p>My attempt so far is :</p>
  <pre><code>reverseRows([[H|T]|_],X):-reverse([H|T],X).
  </code></pre>
  <p>which reverses only the first row. How can I change the above to work for all rows ? Any assistance is welcome.</p>