//arrow-fx-coroutines/arrow.fx.coroutines/parTraverseResult

parTraverseResult

common suspend fun <A, B> Iterable<A>.parTraverseResult(f: suspend CoroutineScope.(A) -> Result<B>): Result<List<B»

Traverses this Iterable and runs all mappers f on Dispatchers.Default. If one or more of the f returns Result.failure then all the Result.failure results will be combined using addSuppressed.

Cancelling this operation cancels all running tasks.

common suspend fun <A, B> Iterable<A>.parTraverseResult(ctx: CoroutineContext = EmptyCoroutineContext, f: suspend CoroutineScope.(A) -> Result<B>): Result<List<B»

Traverses this Iterable and runs all mappers f on CoroutineContext. If one or more of the f returns Result.failure then all the Result.failure results will be combined using addSuppressed.

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 in parallel.

Cancelling this operation cancels all running tasks.

Do you like Arrow?

Arrow Org
<