fold

open fun <R> fold(onSuccess: (value: T) -> R, onFailure: (exception: Throwable) -> R): R