fix bugs in call_with_inference_limit

This commit is contained in:
Mark Thom
2018-02-21 19:46:15 -07:00
parent 7313472a70
commit 5de03444eb
13 changed files with 248 additions and 201 deletions

13
src/prolog/lib/control.pl Normal file
View File

@@ -0,0 +1,13 @@
:- op(700, xfx, \=).
once(G) :- G, !.
\=(X, X) :- !, false.
\=(_, _).
between(Lower, Upper, Lower) :-
Lower =< Upper.
between(Lower1, Upper, X) :-
Lower1 < Upper,
Lower2 is Lower1 + 1,
between(Lower2, Upper, X).