diff options
Diffstat (limited to '')
| -rw-r--r-- | lib/concepts/Ordering.ml | 4 | ||||
| -rw-r--r-- | lib/concepts/Ordering.mli | 3 |
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 |
