summaryrefslogtreecommitdiff
path: root/stdlib.pl
blob: c53cf789762c88ad97daa52871b50cb6be5af77c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% Logic and control predicates
\+ Goal :- call(Goal), !, fail.
\+ Goal.

once(Goal) :-
	call(Goal),
	!.

repeat :- true ; repeat.

% Control structures. 
true.

If -> Then :-
	If, !, Then.

If -> Then ; _ :- 
	If, !, Then.
_ -> _ ; Else :-
	!, Else.
If ; _ :-
	If.
_ ; Else :-
	Else.

% Term unification
A = A.

A \= B :- 
	\+ A = B.