I have this code and when i try to run it with SWI, nothing is shown. Infinite Loop, maybe. I won't explain what i do with this because i'd have to say many things. just wanna know what's wrong with it. i'm running it this way:
mesmaLinhaEste_58((0,4),(4,4),[(1,3),(1,2),(0,0),(2,0),(3,2),(3,3),(4,0)],[]).
mesmaLinhaEste_58((X,_),(Xx,_),[],Lista):-
N is Xx - X,
length(Lista,Nn),
Nn =:= N.
mesmaLinhaEste_58(Atual,Objetivo,[P|R],Lista):-
estaEste58(Atual,P),
append([P],Lista,NList),
mesmaLinhaEste_58(Atual,Objetivo,R,NList).
mesmaLinhaEste_58(Atual,Objetivo,[P|R],Lista):-
\+estaEste58(Atual,P),
mesmaLinhaEste_58(Atual,Objetivo,[R],Lista).
estaEste58((X,Y),(Xx,Yy)):-
Xx > X,
Yy =:= Y.