map

open fun <E1, V1> map(errorFun: Expected.Transformer<E, E1>, valueFun: Expected.Transformer<V, V1>): Expected<E1, V1>

Map both value or error to a new type.

Return

expected with transformed value or error

Parameters

errorFun

Function handling the case when error is present.

valueFun

Function handling the case when value is present.