onSuccess

inline fun onSuccess(action: (value: Success) -> Unit): Try<Success, Failure>

Performs the given action on the encapsulated value if this instance represents success. Returns the original Try unchanged.