@foreach


Description:

public void @foreach (Func<G> func)

Example: Apply a function to each element:

public static int main (string[] args) {
SList<string> list = new SList<string> ();
list.append ("1. entry");
list.append ("2. entry");
list.append ("3. entry");

list.@foreach ((item) => {
print ("%s\n", item);
});

return 0;
}

valac --pkg glib-2.0 GLib.SList.foreach.vala