fold
open fun <R> fold(@NonNull errorFun: Expected.Transformer<E, R>, @NonNull valueFun: Expected.Transformer<V, R>): R
Fold the expected to a common type.
Return
The result of the value function if this was a value or the error function if this was an error.
Parameters
error Fun
Function handling the case when error is present.
value Fun
Function handling the case when value is present.