Returns a new result, mapping any success value using the given transformation.
- Xcode 10.2+
- Swift Standard Library
A closure that takes the success value of this instance.
Result instance with the result of evaluating
transform as the new success value if this instance represents a success.
Use this method when you need to transform the value of a
Result instance when it represents a success. The following example transforms the integer success value of a result into a string: