aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gmap.ml2
-rw-r--r--lib/gmap.mli1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/gmap.ml b/lib/gmap.ml
index 858cb40c8b..0c498fe7db 100644
--- a/lib/gmap.ml
+++ b/lib/gmap.ml
@@ -16,6 +16,8 @@
let empty = Empty
+ let is_empty = function Empty -> true | _ -> false
+
let height = function
Empty -> 0
| Node(_,_,_,_,h) -> h
diff --git a/lib/gmap.mli b/lib/gmap.mli
index 4ed049bb0a..ac1a9922fc 100644
--- a/lib/gmap.mli
+++ b/lib/gmap.mli
@@ -14,6 +14,7 @@
type ('a,'b) t
val empty : ('a,'b) t
+val is_empty : ('a,'b) t -> bool
val add : 'a -> 'b -> ('a,'b) t -> ('a,'b) t
val find : 'a -> ('a,'b) t -> 'b
val remove : 'a -> ('a,'b) t -> ('a,'b) t