This commit is contained in:
Simon Cruanes 2015-09-07 14:32:55 +02:00
parent f1dd17d1aa
commit 3aef755a28
2 changed files with 8 additions and 0 deletions

View file

@ -25,6 +25,8 @@ module type S = sig
val empty : 'a t val empty : 'a t
val is_empty : _ t -> bool
val mem : key -> _ t -> bool val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option val get : key -> 'a t -> 'a option
@ -97,6 +99,10 @@ module MakeFull(K : KEY) : S with type key = K.t = struct
let empty = E let empty = E
let is_empty = function
| E -> true
| N _ -> false
let rec get_exn k m = match m with let rec get_exn k m = match m with
| E -> raise Not_found | E -> raise Not_found
| N (k', v, l, r, _) -> | N (k', v, l, r, _) ->

View file

@ -30,6 +30,8 @@ module type S = sig
val empty : 'a t val empty : 'a t
val is_empty : _ t -> bool
val mem : key -> _ t -> bool val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option val get : key -> 'a t -> 'a option