I get an error message Maximum number of anyflow variants (1000) exceeded
when trying to execute this code:
findNegative([], []).
findNegative([Q|V], Y) :-
Q > 0,
!,
findNegative(V, Y).
findNegative([H1|T1], S) :-
findNegative(T1, [H1|S]).
Same when trying to execute code from this answer: https://stackoverflow.com/a/6671142/4829408