title: Consult with variables an predicate PROLOG
body: <p>the thing is that if for example i ask <code>?- maxC([1,2,3,4], K, M).</code>
  it have to return:</p>
  <pre><code>K=0 M = [];
  K=1 M = [1];
  K=2 M = [1,2];
  K=3 M = [1,2,3];
  K=4 M =[1,2,3,4];
  false.
  </code></pre>
  <p>But it doesn´t</p>
  <pre><code>maxC(_,0,[]). %-&gt;return empty when 0
  maxC([H|_], 1,[H]).%-&gt; return the last element
  maxC([],_,[]). %-&gt; return empty if list of entrance is empty
  maxC([H|T],Nesimo,[H|T2]):- I is Nesimo - 1, maxC(T,I,T2),!.
  </code></pre>