Left

data class Left<L>(val l: L) : Either<L, Nothing> (source)

The left case of an Either.

Constructors

Link copied to clipboard
constructor(l: L)

Properties

Link copied to clipboard
val l: L

Functions

Link copied to clipboard
inline fun <L, R, T> Either<L, R>.flatMap(f: (R) -> Either<L, T>): Either<L, T>

flat-map over the Right side of this Either.

Link copied to clipboard
inline fun <T> fold(fL: (L) -> T, fR: (Nothing) -> T): T

fold this.

Link copied to clipboard
inline fun <T> map(f: (Nothing) -> T): Either<L, T>

Maps over the Right side of this Either.

Link copied to clipboard

Turns this Either into an Option, the Right side becomes Some the left side is ignored and turned into None.