| 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 | (* may raise NotFound *) |
| 10 | method find : 'a -> 'b |
| 11 | method find_opt: 'a -> 'b option |
| 12 | |
| 13 | method haskey : 'a -> bool |
| 14 | method replkey : 'a * 'b -> 'o |
| 15 | |
| 16 | (* better to implement it yourself *) |
| 17 | method virtual keys: 'a list |
| 18 | |
| 19 | method apply : 'a -> ('b -> 'b) -> 'o |
| 20 | method apply_with_default : 'a -> ('b -> 'b) -> (unit -> 'b) -> 'o |
| 21 | |
| 22 | (* effect version *) |
| 23 | method apply_with_default2 : 'a -> ('b -> 'b) -> (unit -> 'b) -> unit |
| 24 | |
| 25 | end |