map


Description:

public Stream<U> map<U> (owned MapFunc<T,U> fn)

Returns a Stream with each element transformed by the function.

Example:

    var upper = stream.map<string> ((s) => { return s.up (); });

Parameters:

fn

the transformation function.

Returns:

a new Stream with transformed elements.