title: Check duplicates values in each row and column in 2D Array
body: <p>I am reading a PDF note on a game in <code>Prolog</code> which is <code>Hitori</code> , I came to the following code</p>
  
  <pre><code>abr([]).
  abr([_]):-!.
  abr([C, C|Cs]):- C \= 0, abr([C|Cs]).
  abr([C1, C2|Cs]):- C1 \= C2, abr([C2|Cs]).
  
  abs([]):- !.
  abs([Cs|Css]):- abr(Cs), !, abs(Css).
  
  ab(P):- transpose(C, Ccol), abs(C), abs(Ccol).
  </code></pre>
  
  <p><code>P</code> arg stands for 2D array and its initial value </p>
  
  <pre><code>-1 -1 -1 -1
  -1 -1 -1 -1
  -1 -1 -1 -1
  -1 -1 -1 -1
  </code></pre>
  
  <p>As well as <code>P</code> will change its value each time so it can test if an element can be replaced with <code>zero</code></p>
  
  <p>Actually i could not get the above code but i think it checks for validation of changing the element to <code>zero</code></p>
  
  <p>So my question is what does the above code do ? </p>