1 (* Bidirectional map {t -> t} *)
8 val add
: item
-> item
-> t
-> t
9 val find
: item
-> t
-> item
10 val mem
: item
-> t
-> bool
11 val rmem
: item
-> t
-> bool
14 module type OrderedType
= sig type t
val compare
: t
-> t
-> int end
15 module Make
(Ord
: OrderedType
) =
18 type t
= (item
* item
) list
20 let add l r list
= (l
,r
)::list
22 let mem = List.mem_assoc
23 let rmem item
= List.exists
(fun (_
,i
) -> i
= item
)