onRight
Performs the given action on the encapsulated B value if this instance represents Either.Right. Returns the original Either unchanged.
import arrow.core.Either
import io.kotest.matchers.shouldBe
fun test() {
Either.Right(1).onRight(::println) shouldBe Either.Right(1)
}
Content copied to clipboard