mapValue

open fun <V1> mapValue(@NonNull valueFun: Expected.Transformer<V, V1>): Expected<E, V1>

Map value to a new type or return the encapsulated error.

Return

new expected with transformed value or encapsulated error

Parameters

valueFun

Function handling the case when value is present.