fold

inline fun <V, F, R> Result<V, F>.fold(ifSuccess: (V) -> R, ifFailure: (F) -> R): R

Folds success or failure into a final value.