Debian Codegraph @

lib/mlrisc-lib/MLRISC/library/hashSet.sig

raw
1 (*
2 * A set datatype that uses hashing
3 *
4 * -- Allen
5 *)
6
7 signature HASH_SET =
8 sig
9
10 type 'a set
11
12 val create : { order : 'a * 'a -> order,
13 hash : 'a -> int
14 } -> int -> 'a set
15
16 val size : 'a set -> int
17 val bucketSize : 'a set -> int
18 val isEmpty : 'a set -> bool
19 val insert : 'a set -> 'a -> unit
20 val remove : 'a set -> 'a -> unit
21 val toList : 'a set -> 'a list
22 val clear : 'a set -> unit
23 val contains : 'a set -> 'a -> bool
24 val app : ('a -> unit) -> 'a set -> unit
25 val fold : ('a * 'b -> 'b) -> 'b -> 'a set -> 'b
26 val toString : ('a -> string) -> 'a set -> string
27
28 end
29