# Left

data class Left<out A>(val value: A) : Either<A, Nothing>

The left side of the disjoint union, as opposed to the Right side.

## Constructors

fun <out A> Left(value: A)

object Companion

## Functions

inline fun all(predicate: (Nothing) -> Boolean): Boolean

Returns `true` if Left or returns the result of the application of the given predicate to the Right value.

inline fun <C> bifoldLeft(    c: C,     f: (C, A) -> C,     g: (C, Nothing) -> C): C
inline fun <C> bifoldMap(    MN: Monoid<C>,     f: (A) -> C,     g: (Nothing) -> C): C
inline fun <C, D> bimap(leftOperation: (A) -> C, rightOperation: (Nothing) -> D): Either<C, D>

Map over Left and Right of this Either

inline fun <AA, C> bitraverse(fe: (A) -> Iterable<AA>, fa: (Nothing) -> Iterable<C>): List<Either<AA, C>>
inline fun <AA, C> bitraverseNullable(fl: (A) -> AA?, fr: (Nothing) -> C?): Either<AA, C>?
inline fun <AA, C> bitraverseOption(fl: (A) -> Option<AA>, fr: (Nothing) -> Option<C>): Option<Either<AA, C>>
inline fun <AA, C, D> bitraverseValidated(fe: (A) -> Validated<AA, C>, fa: (Nothing) -> Validated<AA, D>): Validated<AA, Either<C, D>>
inline fun exists(predicate: (Nothing) -> Boolean): Boolean

Returns `false` if Left or returns the result of the application of the given predicate to the Right value.

inline fun findOrNull(predicate: (Nothing) -> Boolean): Nothing?
inline fun <C> fold(ifLeft: (A) -> C, ifRight: (Nothing) -> C): C

Applies `ifLeft` if this is a Left or `ifRight` if this is a Right.

inline fun <C> foldLeft(initial: C, rightOperation: (C, Nothing) -> C): C
fun <C> foldMap(MN: Monoid<C>, f: (Nothing) -> C): C
fun isEmpty(): Boolean

Returns `true` if Left

fun isLeft(): Boolean
fun isNotEmpty(): Boolean

Returns `true` if Right

fun isRight(): Boolean
inline fun <C> map(f: (Nothing) -> C): Either<A, C>

The given function is applied if this is a Right.

inline fun <C> mapLeft(f: (A) -> C): Either<C, Nothing>

The given function is applied if this is a Left.

fun orNone(): Option<Nothing>
fun orNull(): Nothing?

Returns the right value if it exists, otherwise null

fun replicate(n: Int): Either<A, List<Nothing>>
fun swap(): Either<Nothing, A>

If this is a Left, then return the left value in Right or vice versa.

inline fun tap(f: (Nothing) -> Unit): Either<A, Nothing>

The given function is applied as a fire and forget effect if this is a Right. When applied the result is ignored and the original Either value is returned

inline fun tapLeft(f: (A) -> Unit): Either<A, Nothing>

The given function is applied as a fire and forget effect if this is a Left. When applied the result is ignored and the original Either value is returned

open override fun toString(): String
fun toValidated(): Validated<A, Nothing>
fun toValidatedNel(): ValidatedNel<A, Nothing>
inline fun <C> traverse(fa: (Nothing) -> Option<C>): Option<Either<A, C>>
inline fun <AA, C> traverse(fa: (Nothing) -> Validated<AA, C>): Validated<AA, Either<A, C>>
inline fun <C> traverse(fa: (Nothing) -> Iterable<C>): List<Either<A, C>>