map


Description:

[ CCode ( ordering = 3 ) ]
public virtual Future<A> map<A> (owned MapFunc<A,G> func)

Maps a future value to another value by a function and returns the another value in future.

Note:

As time taken by function might not contribute to wait_until and the implementation is allowed to compute value eagerly by wait_async it is recommended to use task and flat_map for longer computation.

Parameters:

func

Function applied to value

Returns:

Value returned by function

See also:

flat_map, light_map