// an iterator class - can be used in conjunction with all collections
var iterator:=class Value
(
	var dynamic thelist;
	var dynamic accessindex;
	
	var init:=method[tl]
	(
		thelist:=tl;
		accessindex:=0;
	); 
	
	var next:=method[]
	(
		accessindex:=accessindex + 1;
		return thelist.get[accessindex - 1];
	);
	
	var reset:=method[] accessindex:=0;
	
	var hasNext:=method[]
	(
		if (accessindex < thelist.getsize[])
		(
			return true;
		) else (
		 	return false;
		);
	);
	
	
);