prolog matrix treating column
<p>I'm working with matrix where each sublist is a row:</p>

<pre><code>Matrix =[[-,-,-,-,a,-],
         [-,-,-,-,b,-],
         [-,-,-,-,a,-],
         [-,-,-,-,d,a],
         [-,-,-,-,a,a],
         [-,-,a,a,a,a],
         [-,-,-,-,d,a]].
</code></pre>

<p>My goal is to find if there are four consecutive positions in a sublist with the same character that sent.</p>

<pre><code>veryRow(_,[]).
veryRow(X,[T|TS]) :- row(X,T), veryRow(X,TS).
row(X,[A,B,C,D|_]) :- A \= X; B \= X; C \= X; D \= X.
row(X,[_|Xs]):- row(X,Xs).
</code></pre>

<p>Must return true when a sublist four consecutive elements.</p>

<p>my imputs is :</p>

<pre><code>veryRow(a,[[-,-,-,-,a,-],
         [-,-,-,-,b,-],
         [-,-,-,-,a,-],
         [-,-,-,-,d,a],
         [-,-,-,-,a,a],
         [-,-,a,a,a,a],
         [-,-,-,-,d,a]]).
</code></pre>

<p>Because not found?</p>

<p>Thanks</p>