parallelFold

suspend fun <In, Out> Iterable<KotlinResult<In>>.parallelFold(success: suspend CoroutineScope.(In) -> Out, failure: suspend CoroutineScope.(Throwable) -> Out): List<Out>

Parallel KotlinResult.fold of multiple KotlinResults. Each result is processed in a separate coroutine, and the results are collected as a List of Out.

Receiver

An Iterable of KotlinResult to process in parallel.

Return

A list of KotlinResult containing the results of each block.

See also

parallelMap

suspend fun <In, Out> Sequence<KotlinResult<In>>.parallelFold(success: suspend CoroutineScope.(In) -> Out, failure: suspend CoroutineScope.(Throwable) -> Out): List<Out>

Parallel KotlinResult.fold of multiple KotlinResults. Each result is processed in a separate coroutine, and the results are collected as a Sequence of Deferred Out.

Receiver

A Sequence of KotlinResult to process in parallel.

Return

A List of Out containing the results of each block.

See also

parallelMap