Returns the encapsulated result of the given transform function applied to the encapsulated failure if this instance represents failure or the original encapsulated success value if it is a success.