Commit | Line | Data |
---|---|---|
34e49164 C |
1 | |
2 | class virtual ['a, 'b] oassoc : | |
3 | object ('o) | |
4 | inherit ['a * 'b] Ocollection.ocollection | |
5 | ||
6 | method virtual assoc : 'a -> 'b | |
7 | method virtual delkey : 'a -> 'o | |
8 | ||
9 | method find : 'a -> 'b | |
10 | ||
11 | method haskey : 'a -> bool | |
12 | method replkey : 'a * 'b -> 'o | |
13 | ||
91eba41f C |
14 | (* better to implement it yourself *) |
15 | method virtual keys: 'a list | |
16 | ||
34e49164 C |
17 | method apply : 'a -> ('b -> 'b) -> 'o |
18 | method apply_with_default : 'a -> ('b -> 'b) -> (unit -> 'b) -> 'o | |
19 | ||
91eba41f C |
20 | (* effect version *) |
21 | method apply_with_default2 : 'a -> ('b -> 'b) -> (unit -> 'b) -> unit | |
22 | ||
34e49164 | 23 | end |