zip

fun <A, B, C, D> Either<A, B>.zip(fb: Either<A, C>, f: (B, C) -> D): Either<A, D>(source)
fun <A, B, C> Either<A, B>.zip(fb: Either<A, C>): Either<A, Pair<B, C>>(source)
inline fun <A, B, C, D, E> Either<A, B>.zip(c: Either<A, C>, d: Either<A, D>, map: (B, C, D) -> E): Either<A, E>(source)
inline fun <A, B, C, D, E, F> Either<A, B>.zip(c: Either<A, C>, d: Either<A, D>, e: Either<A, E>, map: (B, C, D, E) -> F): Either<A, F>(source)
inline fun <A, B, C, D, E, F, G> Either<A, B>.zip(c: Either<A, C>, d: Either<A, D>, e: Either<A, E>, f: Either<A, F>, map: (B, C, D, E, F) -> G): Either<A, G>(source)
inline fun <A, B, C, D, E, F, G, H> Either<A, B>.zip(c: Either<A, C>, d: Either<A, D>, e: Either<A, E>, f: Either<A, F>, g: Either<A, G>, map: (B, C, D, E, F, G) -> H): Either<A, H>(source)
inline fun <A, B, C, D, E, F, G, H, I> Either<A, B>.zip(c: Either<A, C>, d: Either<A, D>, e: Either<A, E>, f: Either<A, F>, g: Either<A, G>, h: Either<A, H>, map: (B, C, D, E, F, G, H) -> I): Either<A, I>(source)
inline fun <A, B, C, D, E, F, G, H, I, J> Either<A, B>.zip(c: Either<A, C>, d: Either<A, D>, e: Either<A, E>, f: Either<A, F>, g: Either<A, G>, h: Either<A, H>, i: Either<A, I>, map: (B, C, D, E, F, G, H, I) -> J): Either<A, J>(source)
inline fun <A, B, C, D, E, F, G, H, I, J, K> Either<A, B>.zip(c: Either<A, C>, d: Either<A, D>, e: Either<A, E>, f: Either<A, F>, g: Either<A, G>, h: Either<A, H>, i: Either<A, I>, j: Either<A, J>, map: (B, C, D, E, F, G, H, I, J) -> K): Either<A, K>(source)
inline fun <A, B, C, D, E, F, G, H, I, J, K, L> Either<A, B>.zip(c: Either<A, C>, d: Either<A, D>, e: Either<A, E>, f: Either<A, F>, g: Either<A, G>, h: Either<A, H>, i: Either<A, I>, j: Either<A, J>, k: Either<A, K>, map: (B, C, D, E, F, G, H, I, J, K) -> L): Either<A, L>(source)
fun <A, B, Z> Eval<A>.zip(b: Eval<B>, map: (A, B) -> Z): Eval<Z>(source)
fun <A, B> Eval<A>.zip(b: Eval<B>): Eval<Pair<A, B>>(source)
fun <A, B, C, D> Eval<A>.zip(b: Eval<B>, c: Eval<C>, map: (A, B, C) -> D): Eval<D>(source)
fun <A, B, C, D, E> Eval<A>.zip(b: Eval<B>, c: Eval<C>, d: Eval<D>, map: (A, B, C, D) -> E): Eval<E>(source)
fun <A, B, C, D, E, F> Eval<A>.zip(b: Eval<B>, c: Eval<C>, d: Eval<D>, e: Eval<E>, map: (A, B, C, D, E) -> F): Eval<F>(source)
fun <A, B, C, D, E, F, G> Eval<A>.zip(b: Eval<B>, c: Eval<C>, d: Eval<D>, e: Eval<E>, f: Eval<F>, map: (A, B, C, D, E, F) -> G): Eval<G>(source)
fun <A, B, C, D, E, F, G, H> Eval<A>.zip(b: Eval<B>, c: Eval<C>, d: Eval<D>, e: Eval<E>, f: Eval<F>, g: Eval<G>, map: (A, B, C, D, E, F, G) -> H): Eval<H>(source)
fun <A, B, C, D, E, F, G, H, I> Eval<A>.zip(b: Eval<B>, c: Eval<C>, d: Eval<D>, e: Eval<E>, f: Eval<F>, g: Eval<G>, h: Eval<H>, map: (A, B, C, D, E, F, G, H) -> I): Eval<I>(source)
fun <A, B, C, D, E, F, G, H, I, J> Eval<A>.zip(b: Eval<B>, c: Eval<C>, d: Eval<D>, e: Eval<E>, f: Eval<F>, g: Eval<G>, h: Eval<H>, i: Eval<I>, map: (A, B, C, D, E, F, G, H, I) -> J): Eval<J>(source)
fun <A, B, C, D, E, F, G, H, I, J, K> Eval<A>.zip(b: Eval<B>, c: Eval<C>, d: Eval<D>, e: Eval<E>, f: Eval<F>, g: Eval<G>, h: Eval<H>, i: Eval<I>, j: Eval<J>, map: (A, B, C, D, E, F, G, H, I, J) -> K): Eval<K>(source)
fun <A, B, C> Ior<A, B>.zip(SA: Semigroup<A>, fb: Ior<A, C>): Ior<A, Pair<B, C>>(source)
inline fun <A, B, C, D> Ior<A, B>.zip(SA: Semigroup<A>, c: Ior<A, C>, map: (B, C) -> D): Ior<A, D>(source)
inline fun <A, B, C, D, E> Ior<A, B>.zip(SA: Semigroup<A>, c: Ior<A, C>, d: Ior<A, D>, map: (B, C, D) -> E): Ior<A, E>(source)
inline fun <A, B, C, D, E, F> Ior<A, B>.zip(SA: Semigroup<A>, c: Ior<A, C>, d: Ior<A, D>, e: Ior<A, E>, map: (B, C, D, E) -> F): Ior<A, F>(source)
inline fun <A, B, C, D, E, F, G> Ior<A, B>.zip(SA: Semigroup<A>, c: Ior<A, C>, d: Ior<A, D>, e: Ior<A, E>, f: Ior<A, F>, map: (B, C, D, E, F) -> G): Ior<A, G>(source)
inline fun <A, B, C, D, E, F, G, H> Ior<A, B>.zip(SA: Semigroup<A>, c: Ior<A, C>, d: Ior<A, D>, e: Ior<A, E>, f: Ior<A, F>, g: Ior<A, G>, map: (B, C, D, E, F, G) -> H): Ior<A, H>(source)
inline fun <A, B, C, D, E, F, G, H, I> Ior<A, B>.zip(SA: Semigroup<A>, c: Ior<A, C>, d: Ior<A, D>, e: Ior<A, E>, f: Ior<A, F>, g: Ior<A, G>, h: Ior<A, H>, map: (B, C, D, E, F, G, H) -> I): Ior<A, I>(source)
inline fun <A, B, C, D, E, F, G, H, I, J> Ior<A, B>.zip(SA: Semigroup<A>, c: Ior<A, C>, d: Ior<A, D>, e: Ior<A, E>, f: Ior<A, F>, g: Ior<A, G>, h: Ior<A, H>, i: Ior<A, I>, map: (B, C, D, E, F, G, H, I) -> J): Ior<A, J>(source)
inline fun <A, B, C, D, E, F, G, H, I, J, K> Ior<A, B>.zip(SA: Semigroup<A>, c: Ior<A, C>, d: Ior<A, D>, e: Ior<A, E>, f: Ior<A, F>, g: Ior<A, G>, h: Ior<A, H>, i: Ior<A, I>, j: Ior<A, J>, map: (B, C, D, E, F, G, H, I, J) -> K): Ior<A, K>(source)
inline fun <A, B, C, D, E, F, G, H, I, J, K, L> Ior<A, B>.zip(SA: Semigroup<A>, c: Ior<A, C>, d: Ior<A, D>, e: Ior<A, E>, f: Ior<A, F>, g: Ior<A, G>, h: Ior<A, H>, i: Ior<A, I>, j: Ior<A, J>, k: Ior<A, K>, map: (B, C, D, E, F, G, H, I, J, K) -> L): Ior<A, L>(source)
inline fun <B, C, D, E> Iterable<B>.zip(c: Iterable<C>, d: Iterable<D>, transform: (B, C, D) -> E): List<E>(source)
inline fun <B, C, D, E, F> Iterable<B>.zip(c: Iterable<C>, d: Iterable<D>, e: Iterable<E>, transform: (B, C, D, E) -> F): List<F>(source)
inline fun <B, C, D, E, F, G> Iterable<B>.zip(c: Iterable<C>, d: Iterable<D>, e: Iterable<E>, f: Iterable<F>, transform: (B, C, D, E, F) -> G): List<G>(source)
inline fun <B, C, D, E, F, G, H> Iterable<B>.zip(c: Iterable<C>, d: Iterable<D>, e: Iterable<E>, f: Iterable<F>, g: Iterable<G>, transform: (B, C, D, E, F, G) -> H): List<H>(source)
inline fun <B, C, D, E, F, G, H, I> Iterable<B>.zip(c: Iterable<C>, d: Iterable<D>, e: Iterable<E>, f: Iterable<F>, g: Iterable<G>, h: Iterable<H>, transform: (B, C, D, E, F, G, H) -> I): List<I>(source)
inline fun <B, C, D, E, F, G, H, I, J> Iterable<B>.zip(c: Iterable<C>, d: Iterable<D>, e: Iterable<E>, f: Iterable<F>, g: Iterable<G>, h: Iterable<H>, i: Iterable<I>, transform: (B, C, D, E, F, G, H, I) -> J): List<J>(source)
inline fun <B, C, D, E, F, G, H, I, J, K> Iterable<B>.zip(c: Iterable<C>, d: Iterable<D>, e: Iterable<E>, f: Iterable<F>, g: Iterable<G>, h: Iterable<H>, i: Iterable<I>, j: Iterable<J>, transform: (B, C, D, E, F, G, H, I, J) -> K): List<K>(source)
inline fun <B, C, D, E, F, G, H, I, J, K, L> Iterable<B>.zip(c: Iterable<C>, d: Iterable<D>, e: Iterable<E>, f: Iterable<F>, g: Iterable<G>, h: Iterable<H>, i: Iterable<I>, j: Iterable<J>, k: Iterable<K>, transform: (B, C, D, E, F, G, H, I, J, K) -> L): List<L>(source)
inline fun <A, B, C, D> Result<A>.zip(b: Result<B>, c: Result<C>, transform: (A, B, C) -> D): Result<D>(source)
inline fun <A, B, C, D, E> Result<A>.zip(b: Result<B>, c: Result<C>, d: Result<D>, transform: (A, B, C, D) -> E): Result<E>(source)
inline fun <A, B, C, D, E, F> Result<A>.zip(b: Result<B>, c: Result<C>, d: Result<D>, e: Result<E>, transform: (A, B, C, D, E) -> F): Result<F>(source)
inline fun <A, B, C, D, E, F, G> Result<A>.zip(b: Result<B>, c: Result<C>, d: Result<D>, e: Result<E>, f: Result<F>, transform: (A, B, C, D, E, F) -> G): Result<G>(source)
inline fun <A, B, C, D, E, F, G, H> Result<A>.zip(b: Result<B>, c: Result<C>, d: Result<D>, e: Result<E>, f: Result<F>, g: Result<G>, transform: (A, B, C, D, E, F, G) -> H): Result<H>(source)
inline fun <A, B, C, D, E, F, G, H, I> Result<A>.zip(b: Result<B>, c: Result<C>, d: Result<D>, e: Result<E>, f: Result<F>, g: Result<G>, h: Result<H>, transform: (A, B, C, D, E, F, G, H) -> I): Result<I>(source)
inline fun <A, B, C, D, E, F, G, H, I, J> Result<A>.zip(b: Result<B>, c: Result<C>, d: Result<D>, e: Result<E>, f: Result<F>, g: Result<G>, h: Result<H>, i: Result<I>, transform: (A, B, C, D, E, F, G, H, I) -> J): Result<J>(source)
inline fun <A, B, C, D, E, F, G, H, I, J, K> Result<A>.zip(b: Result<B>, c: Result<C>, d: Result<D>, e: Result<E>, f: Result<F>, g: Result<G>, h: Result<H>, i: Result<I>, j: Result<J>, transform: (A, B, C, D, E, F, G, H, I, J) -> K): Result<K>(source)
fun <B, C, D, E> Sequence<B>.zip(c: Sequence<C>, d: Sequence<D>, map: (B, C, D) -> E): Sequence<E>(source)
fun <B, C, D, E, F> Sequence<B>.zip(c: Sequence<C>, d: Sequence<D>, e: Sequence<E>, map: (B, C, D, E) -> F): Sequence<F>(source)
fun <B, C, D, E, F, G> Sequence<B>.zip(c: Sequence<C>, d: Sequence<D>, e: Sequence<E>, f: Sequence<F>, map: (B, C, D, E, F) -> G): Sequence<G>(source)
fun <B, C, D, E, F, G, H> Sequence<B>.zip(c: Sequence<C>, d: Sequence<D>, e: Sequence<E>, f: Sequence<F>, g: Sequence<G>, map: (B, C, D, E, F, G) -> H): Sequence<H>(source)
fun <B, C, D, E, F, G, H, I> Sequence<B>.zip(c: Sequence<C>, d: Sequence<D>, e: Sequence<E>, f: Sequence<F>, g: Sequence<G>, h: Sequence<H>, map: (B, C, D, E, F, G, H) -> I): Sequence<I>(source)
fun <B, C, D, E, F, G, H, I, J> Sequence<B>.zip(c: Sequence<C>, d: Sequence<D>, e: Sequence<E>, f: Sequence<F>, g: Sequence<G>, h: Sequence<H>, i: Sequence<I>, map: (B, C, D, E, F, G, H, I) -> J): Sequence<J>(source)
fun <B, C, D, E, F, G, H, I, J, K> Sequence<B>.zip(c: Sequence<C>, d: Sequence<D>, e: Sequence<E>, f: Sequence<F>, g: Sequence<G>, h: Sequence<H>, i: Sequence<I>, j: Sequence<J>, map: (B, C, D, E, F, G, H, I, J) -> K): Sequence<K>(source)
fun <B, C, D, E, F, G, H, I, J, K, L> Sequence<B>.zip(c: Sequence<C>, d: Sequence<D>, e: Sequence<E>, f: Sequence<F>, g: Sequence<G>, h: Sequence<H>, i: Sequence<I>, j: Sequence<J>, k: Sequence<K>, map: (B, C, D, E, F, G, H, I, J, K) -> L): Sequence<L>(source)
fun <E, A, B> Validated<E, A>.zip(SE: Semigroup<E>, fb: Validated<E, B>): Validated<E, Pair<A, B>>(source)
inline fun <E, A, B, Z> Validated<E, A>.zip(SE: Semigroup<E>, b: Validated<E, B>, f: (A, B) -> Z): Validated<E, Z>(source)
inline fun <E, A, B, C, Z> Validated<E, A>.zip(SE: Semigroup<E>, b: Validated<E, B>, c: Validated<E, C>, f: (A, B, C) -> Z): Validated<E, Z>(source)
inline fun <E, A, B, C, D, Z> Validated<E, A>.zip(SE: Semigroup<E>, b: Validated<E, B>, c: Validated<E, C>, d: Validated<E, D>, f: (A, B, C, D) -> Z): Validated<E, Z>(source)
inline fun <E, A, B, C, D, EE, Z> Validated<E, A>.zip(SE: Semigroup<E>, b: Validated<E, B>, c: Validated<E, C>, d: Validated<E, D>, e: Validated<E, EE>, f: (A, B, C, D, EE) -> Z): Validated<E, Z>(source)
inline fun <E, A, B, C, D, EE, FF, Z> Validated<E, A>.zip(SE: Semigroup<E>, b: Validated<E, B>, c: Validated<E, C>, d: Validated<E, D>, e: Validated<E, EE>, ff: Validated<E, FF>, f: (A, B, C, D, EE, FF) -> Z): Validated<E, Z>(source)
inline fun <E, A, B, C, D, EE, F, G, Z> Validated<E, A>.zip(SE: Semigroup<E>, b: Validated<E, B>, c: Validated<E, C>, d: Validated<E, D>, e: Validated<E, EE>, ff: Validated<E, F>, g: Validated<E, G>, f: (A, B, C, D, EE, F, G) -> Z): Validated<E, Z>(source)
inline fun <E, A, B, C, D, EE, F, G, H, Z> Validated<E, A>.zip(SE: Semigroup<E>, b: Validated<E, B>, c: Validated<E, C>, d: Validated<E, D>, e: Validated<E, EE>, ff: Validated<E, F>, g: Validated<E, G>, h: Validated<E, H>, f: (A, B, C, D, EE, F, G, H) -> Z): Validated<E, Z>(source)
inline fun <E, A, B, C, D, EE, F, G, H, I, Z> Validated<E, A>.zip(SE: Semigroup<E>, b: Validated<E, B>, c: Validated<E, C>, d: Validated<E, D>, e: Validated<E, EE>, ff: Validated<E, F>, g: Validated<E, G>, h: Validated<E, H>, i: Validated<E, I>, f: (A, B, C, D, EE, F, G, H, I) -> Z): Validated<E, Z>(source)
inline fun <E, A, B, C, D, EE, F, G, H, I, J, Z> Validated<E, A>.zip(SE: Semigroup<E>, b: Validated<E, B>, c: Validated<E, C>, d: Validated<E, D>, e: Validated<E, EE>, ff: Validated<E, F>, g: Validated<E, G>, h: Validated<E, H>, i: Validated<E, I>, j: Validated<E, J>, f: (A, B, C, D, EE, F, G, H, I, J) -> Z): Validated<E, Z>(source)
inline fun <E, A, B, Z> ValidatedNel<E, A>.zip(b: ValidatedNel<E, B>, f: (A, B) -> Z): ValidatedNel<E, Z>(source)
inline fun <E, A, B, C, Z> ValidatedNel<E, A>.zip(b: ValidatedNel<E, B>, c: ValidatedNel<E, C>, f: (A, B, C) -> Z): ValidatedNel<E, Z>(source)
inline fun <E, A, B, C, D, Z> ValidatedNel<E, A>.zip(b: ValidatedNel<E, B>, c: ValidatedNel<E, C>, d: ValidatedNel<E, D>, f: (A, B, C, D) -> Z): ValidatedNel<E, Z>(source)
inline fun <E, A, B, C, D, EE, Z> ValidatedNel<E, A>.zip(b: ValidatedNel<E, B>, c: ValidatedNel<E, C>, d: ValidatedNel<E, D>, e: ValidatedNel<E, EE>, f: (A, B, C, D, EE) -> Z): ValidatedNel<E, Z>(source)
inline fun <E, A, B, C, D, EE, FF, Z> ValidatedNel<E, A>.zip(b: ValidatedNel<E, B>, c: ValidatedNel<E, C>, d: ValidatedNel<E, D>, e: ValidatedNel<E, EE>, ff: ValidatedNel<E, FF>, f: (A, B, C, D, EE, FF) -> Z): ValidatedNel<E, Z>(source)
inline fun <E, A, B, C, D, EE, F, G, Z> ValidatedNel<E, A>.zip(b: ValidatedNel<E, B>, c: ValidatedNel<E, C>, d: ValidatedNel<E, D>, e: ValidatedNel<E, EE>, ff: ValidatedNel<E, F>, g: ValidatedNel<E, G>, f: (A, B, C, D, EE, F, G) -> Z): ValidatedNel<E, Z>(source)
inline fun <E, A, B, C, D, EE, F, G, H, Z> ValidatedNel<E, A>.zip(b: ValidatedNel<E, B>, c: ValidatedNel<E, C>, d: ValidatedNel<E, D>, e: ValidatedNel<E, EE>, ff: ValidatedNel<E, F>, g: ValidatedNel<E, G>, h: ValidatedNel<E, H>, f: (A, B, C, D, EE, F, G, H) -> Z): ValidatedNel<E, Z>(source)
inline fun <E, A, B, C, D, EE, F, G, H, I, Z> ValidatedNel<E, A>.zip(b: ValidatedNel<E, B>, c: ValidatedNel<E, C>, d: ValidatedNel<E, D>, e: ValidatedNel<E, EE>, ff: ValidatedNel<E, F>, g: ValidatedNel<E, G>, h: ValidatedNel<E, H>, i: ValidatedNel<E, I>, f: (A, B, C, D, EE, F, G, H, I) -> Z): ValidatedNel<E, Z>(source)
inline fun <E, A, B, C, D, EE, F, G, H, I, J, Z> ValidatedNel<E, A>.zip(b: ValidatedNel<E, B>, c: ValidatedNel<E, C>, d: ValidatedNel<E, D>, e: ValidatedNel<E, EE>, ff: ValidatedNel<E, F>, g: ValidatedNel<E, G>, h: ValidatedNel<E, H>, i: ValidatedNel<E, I>, j: ValidatedNel<E, J>, f: (A, B, C, D, EE, F, G, H, I, J) -> Z): ValidatedNel<E, Z>(source)
inline fun <Key, B, C, D, E> Map<Key, B>.zip(c: Map<Key, C>, d: Map<Key, D>, map: (Key, B, C, D) -> E): Map<Key, E>(source)
inline fun <Key, B, C, D, E, F> Map<Key, B>.zip(c: Map<Key, C>, d: Map<Key, D>, e: Map<Key, E>, map: (Key, B, C, D, E) -> F): Map<Key, F>(source)
inline fun <Key, B, C, D, E, F, G> Map<Key, B>.zip(c: Map<Key, C>, d: Map<Key, D>, e: Map<Key, E>, f: Map<Key, F>, map: (Key, B, C, D, E, F) -> G): Map<Key, G>(source)
inline fun <Key, B, C, D, E, F, G, H> Map<Key, B>.zip(c: Map<Key, C>, d: Map<Key, D>, e: Map<Key, E>, f: Map<Key, F>, g: Map<Key, G>, map: (Key, B, C, D, E, F, G) -> H): Map<Key, H>(source)
inline fun <Key, B, C, D, E, F, G, H, I> Map<Key, B>.zip(c: Map<Key, C>, d: Map<Key, D>, e: Map<Key, E>, f: Map<Key, F>, g: Map<Key, G>, h: Map<Key, H>, map: (Key, B, C, D, E, F, G, H) -> I): Map<Key, I>(source)
inline fun <Key, B, C, D, E, F, G, H, I, J> Map<Key, B>.zip(c: Map<Key, C>, d: Map<Key, D>, e: Map<Key, E>, f: Map<Key, F>, g: Map<Key, G>, h: Map<Key, H>, i: Map<Key, I>, map: (Key, B, C, D, E, F, G, H, I) -> J): Map<Key, J>(source)
inline fun <Key, B, C, D, E, F, G, H, I, J, K> Map<Key, B>.zip(c: Map<Key, C>, d: Map<Key, D>, e: Map<Key, E>, f: Map<Key, F>, g: Map<Key, G>, h: Map<Key, H>, i: Map<Key, I>, j: Map<Key, J>, map: (Key, B, C, D, E, F, G, H, I, J) -> K): Map<Key, K>(source)
inline fun <Key, B, C, D, E, F, G, H, I, J, K, L> Map<Key, B>.zip(c: Map<Key, C>, d: Map<Key, D>, e: Map<Key, E>, f: Map<Key, F>, g: Map<Key, G>, h: Map<Key, H>, i: Map<Key, I>, j: Map<Key, J>, k: Map<Key, K>, map: (Key, B, C, D, E, F, G, H, I, J, K) -> L): Map<Key, L>(source)


inline fun <A, B, C> Result<A>.zip(b: Result<B>, transform: (A, B) -> C): Result<C>(source)

Combines n-arity independent Result values with a transform function.


fun <K, A, B> Map<K, A>.zip(other: Map<K, B>): Map<K, Pair<A, B>>(source)

Combines to structures by taking the intersection of their shapes and using Pair to hold the elements.

import arrow.core.*

fun main(args: Array<String>) {
//sampleStart
val result =
mapOf(1 to "A", 2 to "B").zip(mapOf(1 to "1", 2 to "2", 3 to "3"))
//sampleEnd
println(result)
}

inline fun <Key, A, B, C> Map<Key, A>.zip(other: Map<Key, B>, map: (Key, A, B) -> C): Map<Key, C>(source)

Combines to structures by taking the intersection of their shapes and combining the elements with the given function.

import arrow.core.*

fun main(args: Array<String>) {
//sampleStart
val result =
mapOf(1 to "A", 2 to "B").zip(mapOf(1 to "1", 2 to "2", 3 to "3")) {
key, a, b -> "$key -> $a # $b"
}
//sampleEnd
println(result)
}