Line | |
---|
1 | |
---|
2 | module type OrderedType = sig |
---|
3 | type t |
---|
4 | val compare : t -> t -> int |
---|
5 | end |
---|
6 | |
---|
7 | module type S = sig |
---|
8 | |
---|
9 | type a |
---|
10 | type b |
---|
11 | type t |
---|
12 | |
---|
13 | val empty : t |
---|
14 | val is_empty : t -> bool |
---|
15 | |
---|
16 | val add1 : a -> b -> t -> t |
---|
17 | val add2 : b -> a -> t -> t |
---|
18 | |
---|
19 | val find1 : a -> t -> b |
---|
20 | val find2 : b -> t -> a |
---|
21 | |
---|
22 | val remove1 : a -> t -> t |
---|
23 | val remove2 : b -> t -> t |
---|
24 | |
---|
25 | val mem1 : a -> t -> bool |
---|
26 | val mem2 : b -> t -> bool |
---|
27 | |
---|
28 | val iter1 : (a -> b -> unit) -> t -> unit |
---|
29 | val iter2 : (b -> a -> unit) -> t -> unit |
---|
30 | |
---|
31 | val fold1 : (a -> b -> 'c -> 'c) -> t -> 'c -> 'c |
---|
32 | val fold2 : (b -> a -> 'c -> 'c) -> t -> 'c -> 'c |
---|
33 | |
---|
34 | val compare1 : (b -> b -> int) -> t -> t -> int |
---|
35 | val compare2 : (a -> a -> int) -> t -> t -> int |
---|
36 | |
---|
37 | val equal1 : (b -> b -> bool) -> t -> t -> bool |
---|
38 | val equal2 : (a -> a -> bool) -> t -> t -> bool |
---|
39 | |
---|
40 | end |
---|
41 | |
---|
42 | module Make (O1 : OrderedType) (O2 : OrderedType) : S with type a = O1.t and |
---|
43 | type b = O2.t |
---|
Note: See
TracBrowser
for help on using the repository browser.