mapError

open fun <E1> mapError(errorFun: Expected.Transformer<E, E1>): Expected<E1, V>

Map error to a new type or return encapsulated value.

Return

expected with transformed error or encapsulated value

Parameters

errorFun

Function handling the case when error is present.