toggle menu
core
2.0.0
common
switch theme
search in API
core
/
pro.respawn.apiresult
/
mapOrDefault
map
Or
Default
inline
fun
<
T
,
R
>
ApiResult
<
T
>
.
mapOrDefault
(
default
:
(
e
:
Exception
)
->
R
,
transform
:
(
T
)
->
R
)
:
R
Map the
Success
result using
transform
, and if the result is not a success, return
default