Package arrow.core

Types

Link copied to clipboard
data class Const<A, out T>(value: A)
Link copied to clipboard
sealed class Either<out A, out B>

In day-to-day programming, it is fairly common to find ourselves writing functions that can fail. For instance, querying a service may result in a connection issue, or some unexpected JSON response.

Link copied to clipboard
data class Endo<A>(val f: (A) -> A)

The monoid of endomorphisms under composition.

Link copied to clipboard
sealed class Eval<out A>

Eval is a monad which controls evaluation of a value or a computation that produces a value.

Link copied to clipboard
typealias Invalid<E> = Validated.Invalid<E>
Link copied to clipboard
sealed class Ior<out A, out B>

Port of https://github.com/typelevel/cats/blob/v0.9.0/core/src/main/scala/cats/data/Ior.scala

Link copied to clipboard
typealias IorNel<A, B> = Ior<Nel<A>, B>
Link copied to clipboard
typealias Nel<A> = NonEmptyList<A>
Link copied to clipboard
object None : Option<Nothing>
Link copied to clipboard
class NonEmptyList<out A>(val head: A, val tail: List<A>) : AbstractList<A>

NonEmptyList is a data type used in Λrrow to model ordered lists that guarantee to have at least one value. NonEmptyList is available in the arrow-core module under the import arrow.core.NonEmptyList

Link copied to clipboard
object Nullable
Link copied to clipboard
sealed class Option<out A>

If you have worked with Java at all in the past, it is very likely that you have come across a NullPointerException at some time (other languages will throw similarly named errors in such a case). Usually this happens because some method returns null when you weren't expecting it and, thus, isn't dealing with that possibility in your client code. A value of null is often abused to represent an absent optional value. Kotlin tries to solve the problem by getting rid of null values altogether, and providing its own special syntax Null-safety machinery based on ?.

Link copied to clipboard
typealias Predicate<T> = (T) -> Boolean
Link copied to clipboard
data class Some<out T>(val value: T) : Option<T>
Link copied to clipboard
data class Tuple10<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J)
Link copied to clipboard
data class Tuple11<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K)
Link copied to clipboard
data class Tuple12<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L)
Link copied to clipboard
data class Tuple13<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L, out M>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L,     val thirteenth: M)
Link copied to clipboard
data class Tuple14<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L, out M, out N>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L,     val thirteenth: M,     val fourteenth: N)
Link copied to clipboard
data class Tuple15<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L, out M, out N, out O>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L,     val thirteenth: M,     val fourteenth: N,     val fifteenth: O)
Link copied to clipboard
data class Tuple16<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L, out M, out N, out O, out P>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L,     val thirteenth: M,     val fourteenth: N,     val fifteenth: O,     val sixteenth: P)
Link copied to clipboard
data class Tuple17<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L, out M, out N, out O, out P, out Q>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L,     val thirteenth: M,     val fourteenth: N,     val fifteenth: O,     val sixteenth: P,     val seventeenth: Q)
Link copied to clipboard
data class Tuple18<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L, out M, out N, out O, out P, out Q, out R>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L,     val thirteenth: M,     val fourteenth: N,     val fifteenth: O,     val sixteenth: P,     val seventeenth: Q,     val eighteenth: R)
Link copied to clipboard
data class Tuple19<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L, out M, out N, out O, out P, out Q, out R, out S>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L,     val thirteenth: M,     val fourteenth: N,     val fifteenth: O,     val sixteenth: P,     val seventeenth: Q,     val eighteenth: R,     val nineteenth: S)
Link copied to clipboard
data class Tuple20<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L, out M, out N, out O, out P, out Q, out R, out S, out T>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L,     val thirteenth: M,     val fourteenth: N,     val fifteenth: O,     val sixteenth: P,     val seventeenth: Q,     val eighteenth: R,     val nineteenth: S,     val twentieth: T)
Link copied to clipboard
data class Tuple21<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L, out M, out N, out O, out P, out Q, out R, out S, out T, out U>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L,     val thirteenth: M,     val fourteenth: N,     val fifteenth: O,     val sixteenth: P,     val seventeenth: Q,     val eighteenth: R,     val nineteenth: S,     val twentieth: T,     val twentyFirst: U)
Link copied to clipboard
data class Tuple22<out A, out B, out C, out D, out E, out F, out G, out H, out I, out J, out K, out L, out M, out N, out O, out P, out Q, out R, out S, out T, out U, out V>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I,     val tenth: J,     val eleventh: K,     val twelfth: L,     val thirteenth: M,     val fourteenth: N,     val fifteenth: O,     val sixteenth: P,     val seventeenth: Q,     val eighteenth: R,     val nineteenth: S,     val twentieth: T,     val twentyFirst: U,     val twentySecond: V)
Link copied to clipboard
data class Tuple4<out A, out B, out C, out D>(    val first: A,     val second: B,     val third: C,     val fourth: D)
Link copied to clipboard
data class Tuple5<out A, out B, out C, out D, out E>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E)
Link copied to clipboard
data class Tuple6<out A, out B, out C, out D, out E, out F>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F)
Link copied to clipboard
data class Tuple7<out A, out B, out C, out D, out E, out F, out G>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G)
Link copied to clipboard
data class Tuple8<out A, out B, out C, out D, out E, out F, out G, out H>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H)
Link copied to clipboard
data class Tuple9<out A, out B, out C, out D, out E, out F, out G, out H, out I>(    val first: A,     val second: B,     val third: C,     val fourth: D,     val fifth: E,     val sixth: F,     val seventh: G,     val eighth: H,     val ninth: I)
Link copied to clipboard
typealias Valid<A> = Validated.Valid<A>
Link copied to clipboard
sealed class Validated<out E, out A>
Link copied to clipboard
typealias ValidatedNel<E, A> = Validated<Nel<E>, A>

Functions

Link copied to clipboard
fun <A, B> Iterable<A>.align(b: Iterable<B>): List<Ior<A, B>>
fun <K, A, B> Map<K, A>.align(b: Map<K, B>): Map<K, Ior<A, B>>
fun <A, B> Sequence<A>.align(b: Sequence<B>): Sequence<Ior<A, B>>

Combines two structures by taking the union of their shapes and using Ior to hold the elements.

inline fun <A, B, C> Iterable<A>.align(b: Iterable<B>, fa: (Ior<A, B>) -> C): List<C>
fun <K, A, B, C> Map<K, A>.align(b: Map<K, B>, fa: (Map.Entry<K, Ior<A, B>>) -> C): Map<K, C>
fun <A, B, C> Sequence<A>.align(b: Sequence<B>, fa: (Ior<A, B>) -> C): Sequence<C>

Combines two structures by taking the union of their shapes and combining the elements with the given function.

Link copied to clipboard
inline fun <E, A, B> Validated<E, A>.andThen(f: (A) -> Validated<E, B>): Validated<E, B>

Apply a function to a Valid value, returning a new Validation that may be valid or invalid

expect infix fun <IP, R> () -> IP.andThen(f: (IP) -> R): () -> R
expect infix fun <P1, IP, R> (P1) -> IP.andThen(f: (IP) -> R): (P1) -> R
expect infix fun <P1, P2, IP, R> (P1, P2) -> IP.andThen(f: (IP) -> R): (P1, P2) -> R
actual infix fun <IP, R> () -> IP.andThen(f: (IP) -> R): () -> R
actual infix fun <P1, IP, R> (P1) -> IP.andThen(f: (IP) -> R): (P1) -> R
actual infix fun <P1, P2, IP, R> (P1, P2) -> IP.andThen(f: (IP) -> R): (P1, P2) -> R
actual infix fun <IP, R> () -> IP.andThen(f: (IP) -> R): () -> R
actual infix fun <P1, IP, R> (P1) -> IP.andThen(f: (IP) -> R): (P1) -> R
actual infix fun <P1, P2, IP, R> (P1, P2) -> IP.andThen(f: (IP) -> R): (P1, P2) -> R
actual infix fun <IP, R> () -> IP.andThen(f: (IP) -> R): () -> R
actual infix fun <P1, IP, R> (P1) -> IP.andThen(f: (IP) -> R): (P1) -> R
actual infix fun <P1, P2, IP, R> (P1, P2) -> IP.andThen(f: (IP) -> R): (P1, P2) -> R
Link copied to clipboard
fun <E, A> Validated<E, A>.attempt(): Validated<Nothing, Either<E, A>>
Link copied to clipboard
fun <A, B> Either<Iterable<A>, Iterable<B>>.bisequence(): List<Either<A, B>>
fun <A, B> Ior<Iterable<A>, Iterable<B>>.bisequence(): List<Ior<A, B>>
fun <E, A> Validated<Iterable<E>, Iterable<A>>.bisequence(): List<Validated<E, A>>
Link copied to clipboard
fun <A, B, C> Ior<Either<A, B>, Either<A, C>>.bisequenceEither(): Either<A, Ior<B, C>>
fun <E, A, B> Validated<Either<E, A>, Either<E, B>>.bisequenceEither(): Either<E, Validated<A, B>>
Link copied to clipboard
fun <A, B> Either<A?, B?>.bisequenceNullable(): Either<A, B>?
fun <B, C> Ior<B?, C?>.bisequenceNullable(): Ior<B, C>?
fun <A, B> Validated<A?, B?>.bisequenceNullable(): Validated<A, B>?
Link copied to clipboard
fun <A, B> Either<Option<A>, Option<B>>.bisequenceOption(): Option<Either<A, B>>
fun <B, C> Ior<Option<B>, Option<C>>.bisequenceOption(): Option<Ior<B, C>>
fun <A, B> Validated<Option<A>, Option<B>>.bisequenceOption(): Option<Validated<A, B>>
Link copied to clipboard
fun <A, B, C> Either<Validated<A, B>, Validated<A, C>>.bisequenceValidated(): Validated<A, Either<B, C>>
fun <A, B, C> Ior<Validated<A, B>, Validated<A, C>>.bisequenceValidated(SA: Semigroup<A>): Validated<A, Ior<B, C>>
Link copied to clipboard
fun <A, B> Pair<A, B>.bothIor(): Ior<A, B>
Link copied to clipboard
fun <A, T> Const<A, T>.combine(SG: Semigroup<A>, that: Const<A, T>): Const<A, T>
fun <A> Option<A>.combine(SGA: Semigroup<A>, b: Option<A>): Option<A>
fun <K, A> Map<K, A>.combine(SG: Semigroup<A>, b: Map<K, A>): Map<K, A>
fun <A, B> Either<A, B>.combine(    SGA: Semigroup<A>,     SGB: Semigroup<B>,     b: Either<A, B>): Either<A, B>
fun <A, B> Ior<A, B>.combine(    SA: Semigroup<A>,     SB: Semigroup<B>,     other: Ior<A, B>): Ior<A, B>
fun <E, A> Validated<E, A>.combine(    SE: Semigroup<E>,     SA: Semigroup<A>,     y: Validated<E, A>): Validated<E, A>
fun <A, B> Pair<A, B>.combine(    SA: Semigroup<A>,     SB: Semigroup<B>,     b: Pair<A, B>): Pair<A, B>
Link copied to clipboard
fun <A> Option<A>.combineAll(MA: Monoid<A>): A
fun <E, A> Validated<E, A>.combineAll(MA: Monoid<A>): A
fun <A> Iterable<A>.combineAll(MA: Monoid<A>): A
fun <A> Iterable<Option<A>>.combineAll(MA: Monoid<A>): Option<A>
fun <K, A> Iterable<Map<K, A>>.combineAll(SG: Semigroup<A>): Map<K, A>
fun <A> Sequence<A>.combineAll(MA: Monoid<A>): A
fun <A, B> Iterable<Either<A, B>>.combineAll(MA: Monoid<A>, MB: Monoid<B>): Either<A, B>
Link copied to clipboard
fun <A, B> Either<A, B>.combineK(y: Either<A, B>): Either<A, B>
fun <E, A> Validated<E, A>.combineK(SE: Semigroup<E>, y: Validated<E, A>): Validated<E, A>
Link copied to clipboard
operator fun <A : Comparable<A>, T> Const<A, T>.compareTo(other: Const<A, T>): Int
operator fun <A : Comparable<A>, B : Comparable<B>> Either<A, B>.compareTo(other: Either<A, B>): Int
operator fun <A : Comparable<A>, B : Comparable<B>> Ior<A, B>.compareTo(other: Ior<A, B>): Int
operator fun <A : Comparable<A>> NonEmptyList<A>.compareTo(other: NonEmptyList<A>): Int
operator fun <A : Comparable<A>> Option<A>.compareTo(other: Option<A>): Int
operator fun <A : Comparable<A>, B : Comparable<B>, C : Comparable<C>, D : Comparable<D>, E : Comparable<E>, F : Comparable<F>, G : Comparable<G>, H : Comparable<H>, I : Comparable<I>, J : Comparable<J>> Tuple10<A, B, C, D, E, F, G, H, I, J>.compareTo(other: Tuple10<A, B, C, D, E, F, G, H, I, J>): Int
operator fun <A : Comparable<A>, B : Comparable<B>, C : Comparable<C>, D : Comparable<D>> Tuple4<A, B, C, D>.compareTo(other: Tuple4<A, B, C, D>): Int
operator fun <A : Comparable<A>, B : Comparable<B>, C : Comparable<C>, D : Comparable<D>, E : Comparable<E>> Tuple5<A, B, C, D, E>.compareTo(other: Tuple5<A, B, C, D, E>): Int
operator fun <A : Comparable<A>, B : Comparable<B>, C : Comparable<C>, D : Comparable<D>, E : Comparable<E>, F : Comparable<F>> Tuple6<A, B, C, D, E, F>.compareTo(other: Tuple6<A, B, C, D, E, F>): Int
operator fun <A : Comparable<A>, B : Comparable<B>, C : Comparable<C>, D : Comparable<D>, E : Comparable<E>, F : Comparable<F>, G : Comparable<G>> Tuple7<A, B, C, D, E, F, G>.compareTo(other: Tuple7<A, B, C, D, E, F, G>): Int
operator fun <A : Comparable<A>, B : Comparable<B>, C : Comparable<C>, D : Comparable<D>, E : Comparable<E>, F : Comparable<F>, G : Comparable<G>, H : Comparable<H>> Tuple8<A, B, C, D, E, F, G, H>.compareTo(other: Tuple8<A, B, C, D, E, F, G, H>): Int
operator fun <A : Comparable<A>, B : Comparable<B>, C : Comparable<C>, D : Comparable<D>, E : Comparable<E>, F : Comparable<F>, G : Comparable<G>, H : Comparable<H>, I : Comparable<I>> Tuple9<A, B, C, D, E, F, G, H, I>.compareTo(other: Tuple9<A, B, C, D, E, F, G, H, I>): Int
operator fun <E : Comparable<E>, A : Comparable<A>> Validated<E, A>.compareTo(other: Validated<E, A>): Int
operator fun <A : Comparable<A>, B : Comparable<B>> Pair<A, B>.compareTo(other: Pair<A, B>): Int
operator fun <A : Comparable<A>, B : Comparable<B>, C : Comparable<C>> Triple<A, B, C>.compareTo(other: Triple<A, B, C>): Int
operator fun <A : Comparable<A>> Iterable<A>.compareTo(other: Iterable<A>): Int
Link copied to clipboard
expect infix fun <IP, R, P1> (IP) -> R.compose(f: (P1) -> IP): (P1) -> R
actual infix fun <IP, R, P1> (IP) -> R.compose(f: (P1) -> IP): (P1) -> R
actual infix fun <IP, R, P1> (IP) -> R.compose(f: (P1) -> IP): (P1) -> R
actual infix fun <IP, R, P1> (IP) -> R.compose(f: (P1) -> IP): (P1) -> R
Link copied to clipboard
inline fun <A> A.const(): Const<A, Nothing>
Link copied to clipboard
fun <P1, T> constant(t: T): (P1) -> T
Link copied to clipboard
fun <A, B> Either<A, B>.contains(elem: B): Boolean

Returns true if this is a Right and its value is equal to elem (as determined by ==), returns false otherwise.

Link copied to clipboard
fun <A, T, U> Const<A, T>.contramap(f: (U) -> T): Const<A, U>
Link copied to clipboard
fun <A, B> Iterable<A>.crosswalk(f: (A) -> Iterable<B>): List<List<B>>
fun <A, B> Sequence<A>.crosswalk(f: (A) -> Sequence<B>): Sequence<Sequence<B>>
Link copied to clipboard
fun <A, K, V> Iterable<A>.crosswalkMap(f: (A) -> Map<K, V>): Map<K, List<V>>
fun <A, K, V> Sequence<A>.crosswalkMap(f: (A) -> Map<K, V>): Map<K, Sequence<V>>
Link copied to clipboard
fun <A, B> Iterable<A>.crosswalkNull(f: (A) -> B?): List<B>?
fun <A, B> Sequence<A>.crosswalkNull(f: (A) -> B?): Sequence<B>?
Link copied to clipboard
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> (P18) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> (P18) -> (P19) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> (P18) -> (P19) -> (P20) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> (P18) -> (P19) -> (P20) -> (P21) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> (P18) -> (P19) -> (P20) -> (P21) -> (P22) -> R
fun <P1, P2, R> (P1, P2) -> R.curried(): (P1) -> (P2) -> R
fun <P1, P2, P3, R> (P1, P2, P3) -> R.curried(): (P1) -> (P2) -> (P3) -> R
fun <P1, P2, P3, P4, R> (P1, P2, P3, P4) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> R
fun <P1, P2, P3, P4, P5, R> (P1, P2, P3, P4, P5) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> R
fun <P1, P2, P3, P4, P5, P6, R> (P1, P2, P3, P4, P5, P6) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> R
fun <P1, P2, P3, P4, P5, P6, P7, R> (P1, P2, P3, P4, P5, P6, P7) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, R> (P1, P2, P3, P4, P5, P6, P7, P8) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> suspend (P10) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> suspend (P11) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> suspend (P12) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> suspend (P13) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> suspend (P14) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> suspend (P15) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> suspend (P16) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> suspend (P17) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> suspend (P18) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> (P18) -> suspend (P19) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> (P18) -> (P19) -> suspend (P20) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> (P18) -> (P19) -> (P20) -> suspend (P21) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> (P9) -> (P10) -> (P11) -> (P12) -> (P13) -> (P14) -> (P15) -> (P16) -> (P17) -> (P18) -> (P19) -> (P20) -> (P21) -> suspend (P22) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, R> suspend (P1, P2) -> R.curried(): (P1) -> suspend (P2) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, R> suspend (P1, P2, P3) -> R.curried(): (P1) -> (P2) -> suspend (P3) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, R> suspend (P1, P2, P3, P4) -> R.curried(): (P1) -> (P2) -> (P3) -> suspend (P4) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, R> suspend (P1, P2, P3, P4, P5) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> suspend (P5) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, R> suspend (P1, P2, P3, P4, P5, P6) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> suspend (P6) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, R> suspend (P1, P2, P3, P4, P5, P6, P7) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> suspend (P7) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> suspend (P8) -> R
@JvmName(name = "curriedEffect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9) -> R.curried(): (P1) -> (P2) -> (P3) -> (P4) -> (P5) -> (P6) -> (P7) -> (P8) -> suspend (P9) -> R
Link copied to clipboard
fun <T> Iterable<T>.elementAtOrNone(index: Int): Option<T>

Returns an element as Some(element) at the given index or None if the index is out of bounds of this iterable.

Link copied to clipboard
inline fun <A, B> Either<A, B>.ensure(error: () -> A, predicate: (B) -> Boolean): Either<A, B>
inline fun <A> Option<A>.ensure(error: () -> Unit, predicate: (A) -> Boolean): Option<A>
Link copied to clipboard
fun String.escaped(): String
Link copied to clipboard
inline fun <B> Option<*>.filterIsInstance(): Option<B>

Returns an Option containing all elements that are instances of specified type parameter B.

inline fun <K, R> Map<K, *>.filterIsInstance(): Map<K, R>

Returns a Map containing all elements that are instances of specified type parameter R.

Link copied to clipboard
fun <K, A, B> Map<K, A>.filterMap(f: (A) -> B?): Map<K, B>
Link copied to clipboard
fun <T> Iterable<Option<T>>.filterOption(): List<T>
fun <K, A> Map<K, Option<A>>.filterOption(): Map<K, A>
fun <A> Sequence<Option<A>>.filterOption(): Sequence<A>
Link copied to clipboard
inline fun <A, B> Either<A, B>.filterOrElse(predicate: (B) -> Boolean, default: () -> A): Either<A, B>

Returns Right with the existing value of Right if this is a Right and the given predicate holds for the right value.

Link copied to clipboard
inline fun <A, B> Either<A, B>.filterOrOther(predicate: (B) -> Boolean, default: (B) -> A): Either<A, B>

Returns Right with the existing value of Right if this is a Right and the given predicate holds for the right value.

Link copied to clipboard
inline fun <E, A> Validated<E, A>.findValid(SE: Semigroup<E>, that: () -> Validated<E, A>): Validated<E, A>

If this is valid return this, otherwise if that is valid return that, otherwise combine the failures. This is similar to orElse except that here failures are accumulated.

Link copied to clipboard
fun <T> Iterable<T>.firstOrNone(): Option<T>

Returns the first element as Some(element), or None if the iterable is empty.

inline fun <T> Iterable<T>.firstOrNone(predicate: (T) -> Boolean): Option<T>

Returns the first element as Some(element) matching the given predicate, or None if element was not found.

Link copied to clipboard
inline fun <A, B, C> Either<A, B>.flatMap(f: (B) -> Either<A, C>): Either<A, C>

Binds the given function across Right.

inline fun <A, B> Result<A>.flatMap(transform: (A) -> Result<B>): Result<B>

Compose a transform operation on the success value A into B whilst flattening Result.

fun <K, A, B> Map<K, A>.flatMap(f: (Map.Entry<K, A>) -> Map<K, B>): Map<K, B>

inline fun <A, B, D> Ior<A, B>.flatMap(SG: Semigroup<A>, f: (B) -> Ior<A, D>): Ior<A, D>

Binds the given function across Ior.Right.

Link copied to clipboard
fun <A, B> Either<A, Either<A, B>>.flatten(): Either<A, B>
fun <A> NonEmptyList<NonEmptyList<A>>.flatten(): NonEmptyList<A>
fun <A> Option<Option<A>>.flatten(): Option<A>
fun <A> Iterable<Iterable<A>>.flatten(): List<A>
fun <A> Sequence<Sequence<A>>.flatten(): Sequence<A>
inline fun <A, B> Ior<A, Ior<A, B>>.flatten(SA: Semigroup<A>): Ior<A, B>
Link copied to clipboard
fun <T> Iterable<Option<T>>.flattenOption(): List<T>
Link copied to clipboard
fun <E, A> Validated<E, A>.fold(MA: Monoid<A>): A
fun <A> Iterable<A>.fold(MA: Monoid<A>): A
fun <A> Sequence<A>.fold(MA: Monoid<A>): A
Link copied to clipboard
inline fun <K, A, B> Map<K, A>.foldLeft(b: B, f: (B, Map.Entry<K, A>) -> B): B
fun <A, B, C> SortedMap<A, B>.foldLeft(b: SortedMap<A, C>, f: (SortedMap<A, C>, Map.Entry<A, B>) -> SortedMap<A, C>): SortedMap<A, C>
Link copied to clipboard
fun <A, B> Iterable<A>.foldMap(MB: Monoid<B>, f: (A) -> B): B
fun <A, B> Sequence<A>.foldMap(MB: Monoid<B>, f: (A) -> B): B
Link copied to clipboard
inline fun <B> Either<*, B>.getOrElse(default: () -> B): B

Returns the value from this Right or the given argument if this is a Left.

inline fun <A, B> Ior<A, B>.getOrElse(default: () -> B): B

inline fun <T> Option<T>.getOrElse(default: () -> T): T

Returns the option's value if the option is nonempty, otherwise return the result of evaluating default.

inline fun <E, A> Validated<E, A>.getOrElse(default: () -> A): A

Return the Valid value, or the default if Invalid

Link copied to clipboard
inline fun <A, B> Either<A, B>.getOrHandle(default: (A) -> B): B

Returns the value from this Right or allows clients to transform Left to Right while providing access to the value of Left.

Link copied to clipboard
fun <K, V> Map<K, V>.getOrNone(key: K): Option<V>
Link copied to clipboard
inline fun <A, B> Either<A, B>.handleError(f: (A) -> B): Either<A, B>
inline fun <A> Option<A>.handleError(f: (Unit) -> A): Option<A>
inline fun <E, A> Validated<E, A>.handleError(f: (E) -> A): Validated<Nothing, A>
Link copied to clipboard
inline fun <A, B, C> Either<A, B>.handleErrorWith(f: (A) -> Either<C, B>): Either<C, B>

Applies the given function f if this is a Left, otherwise returns this if this is a Right. This is like flatMap for the exception.

inline fun <A> Option<A>.handleErrorWith(f: (Unit) -> Option<A>): Option<A>
inline fun <E, A> Validated<E, A>.handleErrorWith(f: (E) -> Validated<E, A>): Validated<E, A>

inline fun <A> Result<A>.handleErrorWith(transform: (throwable: Throwable) -> Result<A>): Result<A>

Compose a recovering transform operation on the failure value Throwable whilst flattening Result.

Link copied to clipboard
inline fun <A> identity(a: A): A
Link copied to clipboard
inline fun <A, B> Iterable<A>.ifThen(fb: Iterable<B>, ffa: (A) -> Iterable<B>): Iterable<B>
fun <A, B> Sequence<A>.ifThen(fb: Sequence<B>, ffa: (A) -> Sequence<B>): Sequence<B>

Logical conditional. The equivalent of Prolog's soft-cut. If its first argument succeeds at all, then the results will be fed into the success branch. Otherwise, the failure branch is taken.

Link copied to clipboard
fun <A> Iterable<A>.interleave(other: Iterable<A>): List<A>
fun <A> Sequence<A>.interleave(other: Sequence<A>): Sequence<A>

interleave both computations in a fair way.

Link copied to clipboard
inline fun <E> E.invalid(): Validated<E, Nothing>
Link copied to clipboard
inline fun <E> E.invalidNel(): ValidatedNel<E, Nothing>
Link copied to clipboard
fun <A, B> Iterator<A>.iterateRight(lb: Eval<B>, f: (A, Eval<B>) -> Eval<B>): Eval<B>
Link copied to clipboard
fun <T> Iterable<T>.lastOrNone(): Option<T>

Returns the last element as Some(element), or None if the iterable is empty.

inline fun <T> Iterable<T>.lastOrNone(predicate: (T) -> Boolean): Option<T>

Returns the last element as Some(element) matching the given predicate, or None if no such element was found.

Link copied to clipboard
fun <A> A.left(): Either<A, Nothing>
Link copied to clipboard
inline fun <A, B> Either<A, B?>.leftIfNull(default: () -> A): Either<A, B>

Returns Right with the existing value of Right if this is an Right with a non-null value. The returned Either.Right type is not nullable.

Link copied to clipboard
fun <A> A.leftIor(): Ior<A, Nothing>
Link copied to clipboard
fun <A, B> Iterable<A>.leftPadZip(other: Iterable<B>): List<Pair<A?, B>>

Returns a List> containing the zipped values of the two lists with null for padding on the left.

fun <A, B> Sequence<A>.leftPadZip(other: Sequence<B>): Sequence<Pair<A?, B>>

Returns a Sequence> containing the zipped values of the two sequences with null for padding on the left.

inline fun <A, B, C> Iterable<A>.leftPadZip(other: Iterable<B>, fab: (A?, B) -> C): List<C>

Returns a List containing the result of applying some transformation (A?, B) -> C on a zip, excluding all cases where the right value is null.

fun <A, B, C> Sequence<A>.leftPadZip(other: Sequence<B>, fab: (A?, B) -> C): Sequence<C>

Returns a Sequence containing the result of applying some transformation (A?, B) -> C on a zip, excluding all cases where the right value is null.

Link copied to clipboard
fun <AA, A : AA, B> Either<A, B>.leftWiden(): Either<AA, B>
fun <AA, A : AA, B> Ior<A, B>.leftWiden(): Ior<AA, B>
fun <EE, E : EE, A> Validated<E, A>.leftWiden(): Validated<EE, A>
Link copied to clipboard
fun <A> Sequence<A>.many(): Sequence<Sequence<A>>
Link copied to clipboard
fun <T : Any> Predicate<T>.mapNullable(): (T?) -> Boolean
Link copied to clipboard
inline fun <A> Boolean.maybe(f: () -> A): Option<A>
Link copied to clipboard
fun <R> () -> R.memoize(): () -> R

Memoizes the given pure function so that invocations with the same arguments will only execute the function once.

fun <P1, R> (P1) -> R.memoize(): (P1) -> R
fun <P1, P2, R> (P1, P2) -> R.memoize(): (P1, P2) -> R
fun <P1, P2, P3, R> (P1, P2, P3) -> R.memoize(): (P1, P2, P3) -> R
fun <P1, P2, P3, P4, R> (P1, P2, P3, P4) -> R.memoize(): (P1, P2, P3, P4) -> R
fun <P1, P2, P3, P4, P5, R> (P1, P2, P3, P4, P5) -> R.memoize(): (P1, P2, P3, P4, P5) -> R
Link copied to clipboard
inline fun <A> Either<A, A>.merge(): A

Returns the value from this Right or Left.

Link copied to clipboard
inline fun <A> A.nel(): NonEmptyList<A>
Link copied to clipboard
fun <A> none(): Option<A>
Link copied to clipboard
fun <A> nonEmptyListOf(head: A, vararg t: A): NonEmptyList<A>
Link copied to clipboard
expect fun NonFatal(t: Throwable): Boolean

Extractor of non-fatal Throwable. Will not match fatal errors like VirtualMachineError (for example, OutOfMemoryError and StackOverflowError, subclasses of VirtualMachineError), ThreadDeath, LinkageError, InterruptedException. This will also not match CancellationException since that's a fatal exception in Kotlin for cancellation purposes.

actual fun NonFatal(t: Throwable): Boolean
actual fun NonFatal(t: Throwable): Boolean
actual fun NonFatal(t: Throwable): Boolean
Link copied to clipboard
fun Throwable.nonFatalOrThrow(): Throwable

Returns the Throwable if NonFatal and throws it otherwise.

Link copied to clipboard
fun <A> Sequence<A>.once(): Sequence<A>
Link copied to clipboard
infix fun <T> Option<T>.or(value: Option<T>): Option<T>
Link copied to clipboard
inline fun <A> Option<A>.orElse(alternative: () -> Option<A>): Option<A>

Returns this option's if the option is nonempty, otherwise returns another option provided lazily by default.

inline fun <E, A> Validated<E, A>.orElse(default: () -> Validated<E, A>): Validated<E, A>

Return this if it is Valid, or else fall back to the given default. The functionality is similar to that of findValid except for failure accumulation, where here only the error on the right is preserved and the error on the left is ignored.

Link copied to clipboard
fun <E, A> Validated<E, A>.orNone(): Option<A>
Link copied to clipboard
fun <B> Either<*, B>.orNull(): B?

Returns the value from this Right or null if this is a Left.

fun <E, A> Validated<E, A>.orNull(): A?

Return the Valid value, or null if Invalid

Link copied to clipboard
fun <A, B> Iterable<A>.padZip(other: Iterable<B>): List<Pair<A?, B?>>

Returns a List> containing the zipped values of the two lists with null for padding.

fun <K, A, B> Map<K, A>.padZip(other: Map<K, B>): Map<K, Pair<A?, B?>>

Align two structures as in zip, but filling in blanks with null.

fun <A, B> Sequence<A>.padZip(other: Sequence<B>): Sequence<Pair<A?, B?>>

Returns a Sequence> containing the zipped values of the two sequences with null for padding.

inline fun <A, B, C> Iterable<A>.padZip(other: Iterable<B>, fa: (A?, B?) -> C): List<C>

Returns a List containing the result of applying some transformation (A?, B?) -> C on a zip.

fun <K, A, B, C> Map<K, A>.padZip(other: Map<K, B>, fa: (K, A?, B?) -> C): Map<K, C>

fun <A, B, C> Sequence<A>.padZip(other: Sequence<B>, fa: (A?, B?) -> C): Sequence<C>

Returns a Sequence containing the result of applying some transformation (A?, B?) -> C on a zip.

Link copied to clipboard
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) -> R
fun <P1, R> (P1) -> R.partially1(p1: P1): () -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) -> R
fun <P1, P2, R> (P1, P2) -> R.partially1(p1: P1): (P2) -> R
fun <P1, P2, P3, R> (P1, P2, P3) -> R.partially1(p1: P1): (P2, P3) -> R
fun <P1, P2, P3, P4, R> (P1, P2, P3, P4) -> R.partially1(p1: P1): (P2, P3, P4) -> R
fun <P1, P2, P3, P4, P5, R> (P1, P2, P3, P4, P5) -> R.partially1(p1: P1): (P2, P3, P4, P5) -> R
fun <P1, P2, P3, P4, P5, P6, R> (P1, P2, P3, P4, P5, P6) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6) -> R
fun <P1, P2, P3, P4, P5, P6, P7, R> (P1, P2, P3, P4, P5, P6, P7) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, R> (P1, P2, P3, P4, P5, P6, P7, P8) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8) -> R
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, R> (P1, P2, P3, P4, P5, P6, P7, P8, P9) -> R.partially1(p1: P1): (P2, P3, P4, P5, P6, P7, P8, P9) -> R
@JvmName(name = "partially1Effect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> R.partially1(p1: P1): suspend (P2, P3, P4, P5, P6, P7, P8, P9, P10) -> R
@JvmName(name = "partially1Effect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> R.partially1(p1: P1): suspend (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> R
@JvmName(name = "partially1Effect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> R.partially1(p1: P1): suspend (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> R
@JvmName(name = "partially1Effect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> R.partially1(p1: P1): suspend (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> R
@JvmName(name = "partially1Effect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> R.partially1(p1: P1): suspend (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> R
@JvmName(name = "partially1Effect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> R.partially1(p1: P1): suspend (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> R
@JvmName(name = "partially1Effect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> R.partially1(p1: P1): suspend (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> R
@JvmName(name = "partially1Effect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) -> R.partially1(p1: P1): suspend (P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) -> R
@JvmName(name = "partially1Effect")
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> suspend (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) -> R.partially1(p1: P1)