Left

interface Left<out L> : Either<L, Nothing>

The left side of an Either

Parameters

L

The type of values held in this class

Properties

Link copied to clipboard
abstract val value: L

An L value

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