diff --git a/vala/gee_list_iter/gee_list_iter.vala b/vala/gee_list_iter/gee_list_iter.vala new file mode 100644 index 0000000..cf48488 --- /dev/null +++ b/vala/gee_list_iter/gee_list_iter.vala @@ -0,0 +1,15 @@ +void main () { + var list = new Gee.ArrayList (); + list.add ("1"); + list.add ("2"); + list.add ("3"); + + var it = list.bidir_list_iterator (); + for (var has_next = it.first (); has_next; has_next = it.next ()) { + var next = list.bidir_list_iterator (); + next = it; + next.next (); + stdout.printf ("list[%d] = %s, ", it.index (), it.get ()); + } + stdout.printf ("\n"); +}