major refactor
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user