forEach


Description:

public void forEach (owned ConsumerFunc<T> func)

Applies the given function to each element in the set. The iteration order is not guaranteed.

Example:

    var set = new HashSet<string> (GLib.str_hash, GLib.str_equal);
set.add ("hello");
set.forEach ((s) => {
print ("%s\n", s);
});

Parameters:

func

the function to apply to each element.