major refactor

This commit is contained in:
Mark Thom
2018-05-15 22:47:36 -06:00
parent 8f1d721477
commit 06d896277c
22 changed files with 587 additions and 1276 deletions

View File

@@ -1,13 +1,19 @@
:- module(control, [(\=)/2, between/3, call_cleanup/2, once/1, repeat/0]).
:- use_module(library(builtins)).
:- module(control, [(\=)/2, (\+)/1, between/3, once/1, repeat/0]).
:- op(900, fy, \+).
:- op(700, xfx, \=).
once(G) :- G, !.
\+ G :- G, !, false.
\+ _.
X \= X :- !, false.
_ \= _.
call_cleanup(G, C) :- setup_call_cleanup(true, G, C).
% call_cleanup(G, C) :- setup_call_cleanup(true, G, C).
between(Lower, Upper, Lower) :-
Lower =< Upper.