//arrow-core/arrow.core/Ior/Left

Left

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

Constructors

   
Left common fun <out A> Left(value: A)

Types

Name Summary
Companion common object Companion

Functions

Name Summary
all common inline fun all(predicate: (Nothing) -> Boolean): Boolean
bicrosswalk common inline fun <C, D> bicrosswalk(fa: (A) -> Iterable<C>, fb: (Nothing) -> Iterable<D>): List<Ior<C, D»
bicrosswalkMap common inline fun <C, D, K> bicrosswalkMap(fa: (A) -> Map<K, C>, fb: (Nothing) -> Map<K, D>): Map<K, Ior<C, D»
bicrosswalkNull common inline fun <C, D> bicrosswalkNull(fa: (A) -> C?, fb: (Nothing) -> D?): Ior<C, D>?
bifoldLeft common inline fun <C> bifoldLeft(c: C, f: (C, A) -> C, g: (C, Nothing) -> C): C
bifoldMap common inline fun <C> bifoldMap(MN: Monoid<C>, f: (A) -> C, g: (Nothing) -> C): C
bimap common inline fun <C, D> bimap(fa: (A) -> C, fb: (Nothing) -> D): Ior<C, D>
Apply fa if this is a Left or Both to A and apply fb if this is Right or Both to B
bitraverse common inline fun <AA, C> bitraverse(fa: (A) -> Iterable<AA>, fb: (Nothing) -> Iterable<C>): List<Ior<AA, C»
bitraverseEither common inline fun <AA, C, D> bitraverseEither(fa: (A) -> Either<AA, C>, fb: (Nothing) -> Either<AA, D>): Either<AA, Ior<C, D»
bitraverseNullable common inline fun <C, D> bitraverseNullable(fa: (A) -> C?, fb: (Nothing) -> D?): Ior<C, D>?
bitraverseOption common inline fun <C, D> bitraverseOption(fa: (A) -> Option<C>, fb: (Nothing) -> Option<D>): Option<Ior<C, D»
bitraverseValidated common inline fun <AA, C, D> bitraverseValidated(SA: Semigroup<AA>, fa: (A) -> Validated<AA, C>, fb: (Nothing) -> Validated<AA, D>): Validated<AA, Ior<C, D»
crosswalk common inline fun <C> crosswalk(fa: (Nothing) -> Iterable<C>): List<Ior<A, C»
crosswalkMap common inline fun <K, V> crosswalkMap(fa: (Nothing) -> Map<K, V>): Map<K, Ior<A, V»
crosswalkNull common inline fun <A, B, C> crosswalkNull(ior: Ior<A, B>, fa: (B) -> C?): Ior<A, C>?
exists common 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.
findOrNull common inline fun findOrNull(predicate: (Nothing) -> Boolean): Nothing?
fold common inline fun <C> fold(fa: (A) -> C, fb: (Nothing) -> C, fab: (A, Nothing) -> C): C
Applies fa if this is a Left, fb if this is a Right or fab if this is a Both
foldLeft common inline fun <C> foldLeft(c: C, f: (C, Nothing) -> C): C
foldMap common inline fun <C> foldMap(MN: Monoid<C>, f: (Nothing) -> C): C
isEmpty common fun isEmpty(): Boolean
isNotEmpty common fun isNotEmpty(): Boolean
leftOrNull common fun leftOrNull(): A?
Returns the Left value or A if this is Left or Both and null if this is a Right.
map common inline fun <D> map(f: (Nothing) -> D): Ior<A, D>
The given function is applied if this is a Right or Both to B.
mapLeft common inline fun <C> mapLeft(fa: (A) -> C): Ior<C, Nothing>
The given function is applied if this is a Left or Both to A.
orNull common fun orNull(): Nothing?
Returns the Right value or B if this is Right or Both and null if this is a Left.
padNull common fun padNull(): Pair<A?, Nothing?>
Return this Ior as Pair of nullables]
swap common fun swap(): Ior<Nothing, A>
If this is a Left, then return the left value in Right or vice versa, when this is Both , left and right values are swap
toEither common fun toEither(): Either<A, Nothing>
Returns a Either.Right containing the Right value or B if this is Right or Both and Either.Left if this is a Left.
toString common open override fun toString(): String
toValidated common fun toValidated(): Validated<A, Nothing>
Returns a Validated.Valid containing the Right value or B if this is Right or Both and Validated.Invalid if this is a Left.
traverse common inline fun <C> traverse(fa: (Nothing) -> Iterable<C>): List<Ior<A, C»
traverseEither common inline fun <AA, C> traverseEither(fa: (Nothing) -> Either<AA, C>): Either<AA, Ior<A, C»
traverseNullable common inline fun <C> traverseNullable(fa: (Nothing) -> C?): Ior<A, C>?
traverseOption common inline fun <C> traverseOption(fa: (Nothing) -> Option<C>): Option<Ior<A, C»
traverseValidated common inline fun <AA, C> traverseValidated(fa: (Nothing) -> Validated<AA, C>): Validated<AA, Ior<A, C»
unwrap common fun unwrap(): Either<Either<A, Nothing>, Pair<A, Nothing»
Return the isomorphic Either of this Ior
void common fun void(): Ior<A, Unit>

Properties

Name Summary
isBoth common open override val isBoth: Boolean
Returns true if this is a Both, false otherwise.
isLeft common open override val isLeft: Boolean
Returns true if this is a Left, false otherwise.
isRight common open override val isRight: Boolean
Returns true if this is a Right, false otherwise.
value common val value: A

Do you like Arrow?

Arrow Org
<