summaryrefslogtreecommitdiff
path: root/stdlib.pl
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib.pl')
-rw-r--r--stdlib.pl24
1 files changed, 24 insertions, 0 deletions
diff --git a/stdlib.pl b/stdlib.pl
index c53cf78..b0f2160 100644
--- a/stdlib.pl
+++ b/stdlib.pl
@@ -28,3 +28,27 @@ A = A.
A \= B :-
\+ A = B.
+
+% Comparison of terms using the standard order
+
+A == B :-
+ compare(=, A, B).
+
+A \== B :-
+ \+ A == B.
+
+A @< B :-
+ compare(<, A, B).
+
+A @=< B :-
+ A == B.
+A @=< B :-
+ A @< B.
+
+A @> B :-
+ compare(>, A, B).
+
+A @>= B :-
+ A == B.
+A @>= B :-
+ A @> B.