forEach


Description:

public void forEach (owned ConsumerFunc<T> func)

Applies the given function to each element in the list, from first to last.

Example:

    var list = new LinkedList<string> (GLib.str_equal);
list.addLast ("a");
list.addLast ("b");
list.forEach ((s) => {
print ("%s\n", s);
});

Parameters:

func

the function to apply to each element.