Creates a new result by applying the given function to this result.
The returned object of the function may or may not be directly used. Depending on the internal implementation, A new result object will be created with the value or exception of it and returned, instead of returning it directly.
Future implementation: Creates a new future by applying the given function to this future, in future -- when this future is completed.
Future implementation: If the function returns not a Future but a Result, the result is mapped to a future.
func |
a function applied to this result |
the new result (Future implementation: [Future<A>] the new future) |