Hash: module{
PATH: con "/usr/inferno/hash_int.dis";
fun1, fun2: fn(s:string,n:int):int;
HashNode: adt{
key:string;
i : int;
};
HashTable: adt{
a: array of list of HashNode;
find: fn(h:self ref HashTable, key:string):ref HashNode;
insert: fn(h:self ref HashTable, key:string, val: int);
delete: fn(h:self ref HashTable, key:string);
all: fn(h:self ref HashTable): list of HashNode;
};
new: fn(size:int):ref HashTable;
};
|