mapLeft
The given function is applied if this is a Left or Both to A
.
Example:
import arrow.core.Ior
fun main() {
Ior.Right(12).map { "flower" } // Result: Right(12)
Ior.Left(12).map { "flower" } // Result: Left("power")
Ior.Both(12, "power").map { "flower $it" } // Result: Both("flower 12", "power")
}
Content copied to clipboard