Plan 9 from Bell Labs’s /usr/web/sources/contrib/maht/inferno/module/hash_int.m

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Hash: module{
	PATH: con "/dis/lib/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;
};


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].