Maps the value to another result by applying the given function to the value.
If this result holds an exception, the returned result holds the exception too.
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.
func |
a function applied to value |
the new result |