mapToResult

open fun <V2> mapToResult(filter: (V) -> Result<V2, @UnsafeVariance E>): Result<V2, @UnsafeVariance E>

If the result is a success, this method transforms the value to a different type, possibly returning an error.