onSuccess

inline fun <T> DataResult<T>.onSuccess(action: (T) -> Unit): DataResult<T>

Runs action on the carried value if this is a DataResult.Success, and returns this result either way.

Return

This result, for chaining.

Parameters

action

What to do with the value.