onSuccess

infix inline fun <Ok, Error> Outcome<Ok, Error>.onSuccess(block: (Ok) -> Unit): Outcome<Ok, Error>

Calls block with the Success value if this is a success, then returns the original Outcome unchanged. No-op on Failure.