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.

Important: This is a Public Preview API. It may be changed or removed at any time.