aboutsummaryrefslogtreecommitdiffstats
path: root/lib/concepts/Ordering.ml
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-07-30 19:55:42 +0000
committerMarcos Magueta <maguetamarcos@gmail.com>2026-07-30 16:56:06 -0300
commit2a3ffd895f5c2061d7941134bb15df6047141916 (patch)
treeac564d40b1d24794d4d9c77055b0486eae0128dd /lib/concepts/Ordering.ml
parent357a0c4ec609ccfd86764ac41480bcb7b1194986 (diff)
downloadRNT-2a3ffd895f5c2061d7941134bb15df6047141916.tar.gz
RNT-2a3ffd895f5c2061d7941134bb15df6047141916.zip
B-trees & serialization with bencode
Diffstat (limited to '')
-rw-r--r--lib/concepts/Ordering.ml4
-rw-r--r--lib/concepts/Ordering.mli3
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/concepts/Ordering.ml b/lib/concepts/Ordering.ml
new file mode 100644
index 0000000..42b20e5
--- /dev/null
+++ b/lib/concepts/Ordering.ml
@@ -0,0 +1,4 @@
+type ordering = Equal | Smaller | Greater
+
+let of_int x =
+ if x < 0 then Smaller else if x > 0 then Greater else Equal
diff --git a/lib/concepts/Ordering.mli b/lib/concepts/Ordering.mli
new file mode 100644
index 0000000..ab8a3f4
--- /dev/null
+++ b/lib/concepts/Ordering.mli
@@ -0,0 +1,3 @@
+type ordering = Equal | Smaller | Greater
+
+val of_int : int -> ordering