map


Description:

public ArrayList<U> map<U> (owned MapFunc<T,U> func)

Returns a new ArrayList containing the results of applying the given function to each element.

Example:

    var list = new ArrayList<string> (GLib.str_equal);
list.add ("hello");
var upper = list.map<string> ((s) => { return s.up (); });
assert (upper.get (0) == "HELLO");

Parameters:

func

the transformation function.

Returns:

a new ArrayList with the transformed elements.