zip
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)
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 <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)
fun <B, C, D, E> Sequence<B>.zip(c: Sequence<C>, d: Sequence<D>, map: (B, C, D) -> E): Sequence<E>(source)
Adds kotlin.sequences.zip support for 3 parameters
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)
Adds kotlin.sequences.zip support for 4 parameters
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)
Adds kotlin.sequences.zip support for 5 parameters
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)
Adds kotlin.sequences.zip support for 6 parameters
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)
Adds kotlin.sequences.zip support for 7 parameters
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)
Adds kotlin.sequences.zip support for 8 parameters
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)
Adds kotlin.sequences.zip support for 9 parameters
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)
Adds kotlin.sequences.zip support for 10 parameters
Combines to structures by taking the intersection of their shapes and using Pair
to hold the elements.
import arrow.core.zip
import io.kotest.matchers.shouldBe
fun test() {
mapOf(1 to "A", 2 to "B")
.zip(mapOf(1 to "1", 2 to "2", 3 to "3")) shouldBe mapOf(1 to Pair("A", "1"), 2 to Pair("B", "2"))
}
Content copied to clipboard
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.zip
import io.kotest.matchers.shouldBe
fun test() {
mapOf(1 to "A", 2 to "B").zip(mapOf(1 to "1", 2 to "2", 3 to "3")) {
key, a, b -> "$a ~ $b"
} shouldBe mapOf(1 to "A ~ 1", 2 to "B ~ 2")
}
Content copied to clipboard