mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-10 05:03:54 -05:00
detail
This commit is contained in:
parent
f1dd17d1aa
commit
3aef755a28
2 changed files with 8 additions and 0 deletions
|
|
@ -25,6 +25,8 @@ module type S = sig
|
|||
|
||||
val empty : 'a t
|
||||
|
||||
val is_empty : _ t -> bool
|
||||
|
||||
val mem : key -> _ t -> bool
|
||||
|
||||
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 is_empty = function
|
||||
| E -> true
|
||||
| N _ -> false
|
||||
|
||||
let rec get_exn k m = match m with
|
||||
| E -> raise Not_found
|
||||
| N (k', v, l, r, _) ->
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ module type S = sig
|
|||
|
||||
val empty : 'a t
|
||||
|
||||
val is_empty : _ t -> bool
|
||||
|
||||
val mem : key -> _ t -> bool
|
||||
|
||||
val get : key -> 'a t -> 'a option
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue