Plan 9 from Bell Labs’s /usr/web/sources/contrib/nemo/octopus/module/tbl.m

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


Tbl: module {
	PATH: con "/dis/o/tbl.dis";

	# Taken from styxpersist.b

	Table: adt[T] {
		items:	array of list of (int, T);
		nilval:	T;
	
		new: fn(nslots: int, nilval: T): ref Table[T];
		add:	fn(t: self ref Table, id: int, x: T): int;
		del:	fn(t: self ref Table, id: int): T;
		find:	fn(t: self ref Table, id: int): T;
	};
};

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].