Either

sealed class Either<E, out A>

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Left<E, A>(val value: E) : Either<E, A>
Link copied to clipboard
data class Right<E, A>(val value: A) : Either<E, A>

Functions

Link copied to clipboard
fun <B> flatMap(f: (A) -> Either<E, B>): Either<E, B>
Link copied to clipboard
fun <C> fold(ifLeft: (E) -> C, ifRight: (A) -> C): C
Link copied to clipboard
fun getOrNull(): A?
Link copied to clipboard
fun <B> map(f: (A) -> B): Either<E, B>
Link copied to clipboard
suspend fun <C> suspendFold(ifLeft: suspend (E) -> C, ifRight: suspend (A) -> C): C