//arrow-core/arrow.core/merge

merge

common inline fun <A> Either<A, A>.merge(): A

Returns the value from this Right or Left.

Example:

import arrow.core.Either.Left
import arrow.core.Either.Right
import arrow.core.merge

fun main() {
  Right(12).merge() // Result: 12
  Left(12).merge() // Result: 12
}

Do you like Arrow?

Arrow Org
<