// valac hashset-iterator.vala --pkg gee-0.8

using Gee;

void main () {
	var myset = new HashSet<uint> ();
	for (uint i = 0; i < 50; i++) {
		myset.add (i);
	}

	var iter = myset.iterator ();
	while (iter.next ()) {
		message ("Removing %u", iter.get ());
		iter.remove ();
	}

	assert (myset.size == 0);
}
