Debian Codegraph @

lib/mlrisc-lib/MLRISC/library/hash-table.sig

raw
1 (*
2 * Signature of the hash table datatype
3 *
4 * -- Allen
5 *)
6
7 signature HASHTABLE =
8 sig
9
10 type ('a,'b) table
11
12 val create : { hash : 'a -> word,
13 == : 'a * 'a -> bool,
14 exn : exn,
15 size : int
16 } -> ('a,'b) table
17
18 val size : ('a,'b) table -> int
19 val clear : ('a,'b) table -> unit
20 val insert : ('a,'b) table -> 'a * 'b -> unit
21 val remove : ('a,'b) table -> 'a -> unit
22 val lookup : ('a,'b) table -> 'a -> 'b
23 val copy : ('a,'b) table -> ('a,'b) table
24 val app : ('a * 'b -> unit) -> ('a,'b) table -> unit
25 val map : ('a * 'b -> 'c) -> ('a,'b) table -> 'c list
26 val fold : ('a * 'b * 'c -> 'c) -> 'c -> ('a,'b) table -> 'c
27
28 end
29