map
Transforms the value inside DataResult.Success, leaving DataResult.Failure unchanged.
Allows for clean and safe operation on the result without throwing exceptions. Example: result.map { it.toString() } converts Success
Return
New DataResult with transformed value or original Failure.
Parameters
T
Original value type.
R
Value type after transformation.
transform
Function transforming value of type T to type R.