Package-level declarations

Types

Link copied to clipboard
sealed interface Either<out L, out R>

Represents a value which may be one of two possible types: L or R. An instance of this type will be either Left or Right.

Inherited functions

Link copied to clipboard
inline fun <L, R, T> Either<L, R>.fold(ifLeft: (left: L) -> T, ifRight: (right: R) -> T): T

Transform this Either into a value of type T via specialized mapping functions for both left and right values

Link copied to clipboard
inline fun <L, R, R2> Either<L, R>.map(func: (right: R) -> R2): Either<L, R2>

Map the right value of this Either to a new value. Left values are unmodified.

Link copied to clipboard
fun <T> Either<T, T>.merge(): T

Returns the left value or right value