parZip

inline suspend fun <A, B, C> parZip(crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline f: suspend CoroutineScope.(A, B) -> C): C

Runs fa, fb in parallel on Dispatchers.Default and combines their results using the provided function.

import arrow.fx.coroutines.*

suspend fun main(): Unit {
//sampleStart
val result = parZip(
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" }
) { a, b ->
"$a\n$b"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

f

function to zip/combine value A and B

See also

for a function that can run on any CoroutineContext


inline suspend fun <A, B, C> parZip(ctx: CoroutineContext = EmptyCoroutineContext, crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline f: suspend CoroutineScope.(A, B) -> C): C

Runs fa, fb in parallel on ctx and combines their results using the provided function.

Coroutine context is inherited from a CoroutineScope, additional context elements can be specified with ctx argument. If the combined context does not have any dispatcher nor any other ContinuationInterceptor, then Dispatchers.Default is used. WARNING If the combined context has a single threaded ContinuationInterceptor, this function will not run fa, fb in parallel.

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" }
) { a, b ->
"$a\n$b"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

f

function to zip/combine value A and B

See also

for a function that ensures operations run in parallel on the Dispatchers.Default.


inline suspend fun <A, B, C, D> parZip(crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline f: suspend CoroutineScope.(A, B, C) -> D): D

Runs fa, fb, fc in parallel on Dispatchers.Default and combines their results using the provided function.

import arrow.fx.coroutines.*

suspend fun main(): Unit {
//sampleStart
val result = parZip(
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" }
) { a, b, c ->
"$a\n$b\n$c"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

f

function to zip/combine value A, B and C

See also

for a function that can run on any CoroutineContext.


inline suspend fun <A, B, C, D> parZip(ctx: CoroutineContext = EmptyCoroutineContext, crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline f: suspend CoroutineScope.(A, B, C) -> D): D

Runs fa, fb, fc in parallel on ctx and combines their results using the provided function.

Coroutine context is inherited from a CoroutineScope, additional context elements can be specified with ctx argument. If the combined context does not have any dispatcher nor any other ContinuationInterceptor, then Dispatchers.Default is used. WARNING If the combined context has a single threaded ContinuationInterceptor, this function will not run fa, fb&fc in parallel.

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" }
) { a, b, c ->
"$a\n$b\n$c"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

f

function to zip/combine value A, B and C.

See also

for a function that ensures operations run in parallel on the Dispatchers.Default.


inline suspend fun <A, B, C, D, E> parZip(crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline f: suspend CoroutineScope.(A, B, C, D) -> E): E

Runs fa, fb, fc, fd in parallel on Dispatchers.Default and combines their results using the provided function.

import arrow.fx.coroutines.*

suspend fun main(): Unit {
//sampleStart
val result = parZip(
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" }
) { a, b, c, d ->
"$a\n$b\n$c\n$d"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

f

function to zip/combine value A, B, C and D

See also

for a function that can run on any CoroutineContext.


inline suspend fun <A, B, C, D, E> parZip(ctx: CoroutineContext = EmptyCoroutineContext, crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline f: suspend CoroutineScope.(A, B, C, D) -> E): E

Runs fa, fb, fc, fd in parallel on ctx and combines their results using the provided function.

Coroutine context is inherited from a CoroutineScope, additional context elements can be specified with ctx argument. If the combined context does not have any dispatcher nor any other ContinuationInterceptor, then Dispatchers.Default is used. WARNING If the combined context has a single threaded ContinuationInterceptor, this function will not run fa, fb, fc&fd in parallel.

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" }
) { a, b, c, d ->
"$a\n$b\n$c\n$d"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

f

function to zip/combine value A, B, C and D.

See also

for a function that ensures operations run in parallel on the Dispatchers.Default.


inline suspend fun <A, B, C, D, E, F> parZip(crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline fe: suspend CoroutineScope.() -> E, crossinline f: suspend CoroutineScope.(A, B, C, D, E) -> F): F

Runs fa, fb, fc, fd, fe in parallel on Dispatchers.Default and combines their results using the provided function.

import arrow.fx.coroutines.*

suspend fun main(): Unit {
//sampleStart
val result = parZip(
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e ->
"$a\n$b\n$c\n$d\n$e"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

fe

value to parallel zip

f

function to zip/combine value A, B, C, D and E

See also

for a function that can run on any CoroutineContext.


inline suspend fun <A, B, C, D, E, F> parZip(ctx: CoroutineContext = EmptyCoroutineContext, crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline fe: suspend CoroutineScope.() -> E, crossinline f: suspend CoroutineScope.(A, B, C, D, E) -> F): F

Runs fa, fb, fc, fd, fe in parallel on ctx and combines their results using the provided function.

Coroutine context is inherited from a CoroutineScope, additional context elements can be specified with ctx argument. If the combined context does not have any dispatcher nor any other ContinuationInterceptor, then Dispatchers.Default is used. WARNING If the combined context has a single threaded ContinuationInterceptor, this function will not run fa, fb, fc, fd&fe in parallel.

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e ->
"$a\n$b\n$c\n$d\n$e"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

fe

value to parallel zip

f

function to zip/combine value A, B, C, D, and E.

See also

for a function that ensures operations run in parallel on the Dispatchers.Default.


inline suspend fun <A, B, C, D, E, F, G> parZip(crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline fe: suspend CoroutineScope.() -> E, crossinline ff: suspend CoroutineScope.() -> F, crossinline f: suspend CoroutineScope.(A, B, C, D, E, F) -> G): G

Runs fa, fb, fc, fd, fe, ff in parallel on Dispatchers.Default and combines their results using the provided function.

import arrow.fx.coroutines.*

suspend fun main(): Unit {
//sampleStart
val result = parZip(
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f ->
"$a\n$b\n$c\n$d\n$e\n$f"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

fe

value to parallel zip

ff

value to parallel zip

f

function to zip/combine value A, B, C, D, E and F

See also

for a function that can run on any CoroutineContext.


inline suspend fun <A, B, C, D, E, F, G> parZip(ctx: CoroutineContext = EmptyCoroutineContext, crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline fe: suspend CoroutineScope.() -> E, crossinline ff: suspend CoroutineScope.() -> F, crossinline f: suspend CoroutineScope.(A, B, C, D, E, F) -> G): G

Runs fa, fb, fc, fd, fe, ff in parallel on ctx and combines their results using the provided function.

Coroutine context is inherited from a CoroutineScope, additional context elements can be specified with ctx argument. If the combined context does not have any dispatcher nor any other ContinuationInterceptor, then Dispatchers.Default is used. WARNING If the combined context has a single threaded ContinuationInterceptor, this function will not run fa, fb, fc, fd, fe&ff in parallel.

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, g ->
"$a\n$b\n$c\n$d\n$e\n$g"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

fe

value to parallel zip

ff

value to parallel zip

f

function to zip/combine value A, B, C, D, E and F

See also

for a function that ensures operations run in parallel on the Dispatchers.Default.


inline suspend fun <A, B, C, D, E, F, G, H> parZip(crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline fe: suspend CoroutineScope.() -> E, crossinline ff: suspend CoroutineScope.() -> F, crossinline fg: suspend CoroutineScope.() -> G, crossinline f: suspend CoroutineScope.(A, B, C, D, E, F, G) -> H): H

Runs fa, fb, fc, fd, fe, ff, fg in parallel on Dispatchers.Default and combines their results using the provided function.

import arrow.fx.coroutines.*

suspend fun main(): Unit {
//sampleStart
val result = parZip(
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, g, h ->
"$a\n$b\n$c\n$d\n$e\n$g\n$h"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

fe

value to parallel zip

ff

value to parallel zip

fg

value to parallel zip

f

function to zip/combine value A, B, C, D, E, F and G

See also

for a function that can run on any CoroutineContext.


inline suspend fun <A, B, C, D, E, F, G, H> parZip(ctx: CoroutineContext = EmptyCoroutineContext, crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline fe: suspend CoroutineScope.() -> E, crossinline ff: suspend CoroutineScope.() -> F, crossinline fg: suspend CoroutineScope.() -> G, crossinline f: suspend CoroutineScope.(A, B, C, D, E, F, G) -> H): H

Runs fa, fb, fc, fd, fe, ff, fg in parallel on ctx and combines their results using the provided function.

Coroutine context is inherited from a CoroutineScope, additional context elements can be specified with ctx argument. If the combined context does not have any dispatcher nor any other ContinuationInterceptor, then Dispatchers.Default is used. WARNING If the combined context has a single threaded ContinuationInterceptor, this function will not run fa, fb, fc, fd, fe, ff&fg in parallel.

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f, g ->
"$a\n$b\n$c\n$d\n$e\n$f\n$g"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

fe

value to parallel zip

ff

value to parallel zip

fg

value to parallel zip

f

function to zip/combine value A, B, C, D, E, F and G

See also

for a function that ensures operations run in parallel on the Dispatchers.Default.


inline suspend fun <A, B, C, D, E, F, G, H, I> parZip(crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline fe: suspend CoroutineScope.() -> E, crossinline ff: suspend CoroutineScope.() -> F, crossinline fg: suspend CoroutineScope.() -> G, crossinline fh: suspend CoroutineScope.() -> H, crossinline f: suspend CoroutineScope.(A, B, C, D, E, F, G, H) -> I): I

Runs fa, fb, fc, fd, fe, ff, fg, fh in parallel on Dispatchers.Default and combines their results using the provided function.

import arrow.fx.coroutines.*

suspend fun main(): Unit {
//sampleStart
val result = parZip(
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" },
{ "Eighth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f, g, h ->
"$a\n$b\n$c\n$d\n$e\n$f\n$g\n$h"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

fe

value to parallel zip

ff

value to parallel zip

fg

value to parallel zip

fh

value to parallel zip

f

function to zip/combine value A, B, C, D, E, F, G and H

See also

for a function that can run on any CoroutineContext.


inline suspend fun <A, B, C, D, E, F, G, H, I> parZip(ctx: CoroutineContext = EmptyCoroutineContext, crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline fe: suspend CoroutineScope.() -> E, crossinline ff: suspend CoroutineScope.() -> F, crossinline fg: suspend CoroutineScope.() -> G, crossinline fh: suspend CoroutineScope.() -> H, crossinline f: suspend CoroutineScope.(A, B, C, D, E, F, G, H) -> I): I

Runs fa, fb, fc, fd, fe, ff, fg, fh in parallel on ctx and combines their results using the provided function.

Coroutine context is inherited from a CoroutineScope, additional context elements can be specified with ctx argument. If the combined context does not have any dispatcher nor any other ContinuationInterceptor, then Dispatchers.Default is used. WARNING If the combined context has a single threaded ContinuationInterceptor, this function will not run fa, fb, fc, fd, fe, ff&fg in parallel.

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" },
fh = { "Eighth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f, g, h ->
"$a\n$b\n$c\n$d\n$e\n$f\n$g\n$h"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

fe

value to parallel zip

ff

value to parallel zip

fg

value to parallel zip

fh

value to parallel zip

f

function to zip/combine value A, B, C, D, E, F, G and H

See also

for a function that ensures operations run in parallel on the Dispatchers.Default.


inline suspend fun <A, B, C, D, E, F, G, H, I, J> parZip(crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline fe: suspend CoroutineScope.() -> E, crossinline ff: suspend CoroutineScope.() -> F, crossinline fg: suspend CoroutineScope.() -> G, crossinline fh: suspend CoroutineScope.() -> H, crossinline fi: suspend CoroutineScope.() -> I, crossinline f: suspend CoroutineScope.(A, B, C, D, E, F, G, H, I) -> J): J

Runs fa, fb, fc, fd, fe, ff, fg, fh, fi in parallel on Dispatchers.Default and combines their results using the provided function.

import arrow.fx.coroutines.*

suspend fun main(): Unit {
//sampleStart
val result = parZip(
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" },
{ "Eighth one is on ${Thread.currentThread().name}" },
fi = { "Ninth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f, g, h, i->
"$a\n$b\n$c\n$d\n$e\n$f\n$g\n$h\n$i"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

fe

value to parallel zip

ff

value to parallel zip

fg

value to parallel zip

fh

value to parallel zip

fi

value to parallel zip

f

function to zip/combine value A, B, C, D, E, F, G, H, I

See also

for a function that can run on any CoroutineContext.


inline suspend fun <A, B, C, D, E, F, G, H, I, J> parZip(ctx: CoroutineContext = EmptyCoroutineContext, crossinline fa: suspend CoroutineScope.() -> A, crossinline fb: suspend CoroutineScope.() -> B, crossinline fc: suspend CoroutineScope.() -> C, crossinline fd: suspend CoroutineScope.() -> D, crossinline fe: suspend CoroutineScope.() -> E, crossinline ff: suspend CoroutineScope.() -> F, crossinline fg: suspend CoroutineScope.() -> G, crossinline fh: suspend CoroutineScope.() -> H, crossinline fi: suspend CoroutineScope.() -> I, crossinline f: suspend CoroutineScope.(A, B, C, D, E, F, G, H, I) -> J): J

Runs fa, fb, fc, fd, fe, ff, fg, fh, fi in parallel on ctx and combines their results using the provided function.

Coroutine context is inherited from a CoroutineScope, additional context elements can be specified with ctx argument. If the combined context does not have any dispatcher nor any other ContinuationInterceptor, then Dispatchers.Default is used. WARNING If the combined context has a single threaded ContinuationInterceptor, this function will not run fa, fb, fc, fd, fe, ff, fg, fh&fi in parallel.

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" },
{ "Eighth one is on ${Thread.currentThread().name}" },
fi = { "Ninth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f, g, h, i->
"$a\n$b\n$c\n$d\n$e\n$f\n$g\n$h\n$i"
}
//sampleEnd
println(result)
}

Parameters

fa

value to parallel zip

fb

value to parallel zip

fc

value to parallel zip

fd

value to parallel zip

fe

value to parallel zip

ff

value to parallel zip

fg

value to parallel zip

fh

value to parallel zip

fi

value to parallel zip

f

function to zip/combine value A, B, C, D, E, F, G, H and I

See also

for a function that ensures operations run in parallel on the Dispatchers.Default.