Applies the given function to each element in the list.
Example:
var list = new ArrayList<string> (GLib.str_equal);
list.add ("hello");
list.forEach ((s) => {
print ("%s\n", s);
});
| func |
the function to apply to each element. |