dev/vala/clone_gee_iterator/clone_gee_iterator.vala

19 lines
463 B
Vala

void main () {
var l = new Gee.ArrayList<string> ();
for (var i = 0; i < 8; ++i)
l.add (i.to_string ());
var it = l.bidir_list_iterator (),
it2 = l.bidir_list_iterator ();
it2.first ();
for (var has_next = it.first (); has_next; has_next = it.next ()) {
it2 = it;//.set (it.index ());
var it3 = it2.copy ();
stdout.printf ("%s", it2.get ());
stdout.printf (" ");
stdout.printf ("%lu %lu", (ulong)it, (ulong)it2);
stdout.printf ("\n");
}
}