fold

inline fun <R> fold(onSuccess: (T) -> R, onFailure: (String) -> R): R