@foreach


Description:

public void @foreach (Func<G> func)

Example: Apply a function to each element:

public static int main (string[] args) {
GenericArray<string> array = new GenericArray<string> ();
array.add ("first entry");
array.add ("second entry");
array.add ("third entry");

// Output:
// ``first entry``
// ``second entry``
// ``third entry``
array.foreach ((str) => {
print ("%s\n", str);
});

return 0;
}

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