aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraspiwack2007-10-23 15:02:23 +0000
committeraspiwack2007-10-23 15:02:23 +0000
commit49554b6ca1bf726ec5ca5305b8ef5806010dfc58 (patch)
tree276d5ead8da662eb0c16a47cfa710c207e2849de /lib
parent3516168ef6732dfb5fe8154f5e899645b7b2161f (diff)
Added "is_empty" to gmap.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10250 85f007b7-540e-0410-9357-904b9bb8a0f7
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