[ 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.
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.
func |
Function applied to value |
Value returned by function |