arrow-fx-coroutines / arrow.fx.coroutines / kotlin.collections.Iterable
parSequence | Sequences all tasks in parallel on Dispatchers.Default and return the resultsuspend fun <A> Iterable <suspend () -> A>.parSequence(): List <A> Sequences all tasks in parallel and return the result suspend fun <A> Iterable <suspend () -> A>.parSequence(ctx: CoroutineContext = EmptyCoroutineContext): List <A> |
parSequenceEither | Sequences all tasks in parallel on Dispatchers.Default and return the result. If one of the tasks returns Either.Left, then it will short-circuit the operation and cancelling all this running tasks, and returning the first encountered Either.Left.suspend fun <A, B> Iterable <suspend () -> Either<A, B>>.parSequenceEither(): Either<A, List <B>> Sequences all tasks in parallel on ctx and return the result. If one of the tasks returns Either.Left, then it will short-circuit the operation and cancelling all this running tasks, and returning the first encountered Either.Left. suspend fun <A, B> Iterable <suspend () -> Either<A, B>>.parSequenceEither(ctx: CoroutineContext = EmptyCoroutineContext): Either<A, List <B>> Sequences all tasks in parallel on Dispatchers.Default and returns the result. If one or more of the tasks returns Validated.Invalid then all the Validated.Invalid results will be combined using semigroup. suspend fun <E, A> Iterable <suspend () -> Validated<E, A>>.parSequenceEither(semigroup: Semigroup<E>): Validated<E, List <A>> |
parSequenceEitherN | Sequences all tasks in n parallel processes on Dispatchers.Default and return the result.suspend fun <A, B> Iterable <suspend () -> Either<A, B>>.parSequenceEitherN(n: Int ): Either<A, List <B>> Sequences all tasks in n parallel processes on ctx and return the result. suspend fun <A, B> Iterable <suspend () -> Either<A, B>>.parSequenceEitherN(ctx: CoroutineContext = EmptyCoroutineContext, n: Int ): Either<A, List <B>> |
parSequenceN | Sequences all tasks in n parallel processes on Dispatchers.Default and return the result.suspend fun <A> Iterable <suspend () -> A>.~~parSequenceN~~(n: Long ): List <A> suspend fun <A> Iterable <suspend () -> A>.parSequenceN(n: Int ): List <A> Sequences all tasks in n parallel processes and return the result. suspend fun <A> Iterable <suspend () -> A>.~~parSequenceN~~(ctx: CoroutineContext = EmptyCoroutineContext, n: Long ): List <A> suspend fun <A> Iterable <suspend () -> A>.parSequenceN(ctx: CoroutineContext = EmptyCoroutineContext, n: Int ): List <A> |
parSequenceValidated | Sequences all tasks in parallel on ctx and returns the result. If one or more of the tasks returns Validated.Invalid then all the Validated.Invalid results will be combined using semigroup.suspend fun <E, A> Iterable <suspend () -> Validated<E, A>>.parSequenceValidated(ctx: CoroutineContext = EmptyCoroutineContext, semigroup: Semigroup<E>): Validated<E, List <A>> |
parSequenceValidatedN | Traverses this Iterable and runs f in n parallel operations on CoroutineContext. If one or more of the tasks returns Validated.Invalid then all the Validated.Invalid results will be combined using semigroup.suspend fun <E, A> Iterable <suspend () -> Validated<E, A>>.parSequenceValidatedN(semigroup: Semigroup<E>, n: Int ): Validated<E, List <A>> suspend fun <E, A> Iterable <suspend () -> Validated<E, A>>.parSequenceValidatedN(ctx: CoroutineContext = EmptyCoroutineContext, semigroup: Semigroup<E>, n: Int ): Validated<E, List <A>> |
parTraverse | Traverses this Iterable and runs all mappers f on Dispatchers.Default. Cancelling this operation cancels all running tasks.suspend fun <A, B> Iterable <A>.parTraverse(f: suspend (A) -> B): List <B> Traverses this Iterable and runs all mappers f on CoroutineContext. suspend fun <A, B> Iterable <A>.parTraverse(ctx: CoroutineContext = EmptyCoroutineContext, f: suspend (A) -> B): List <B> |
parTraverseEither | Traverses this Iterable and runs all mappers f on Dispatchers.Default. If one of the f returns Either.Left, then it will short-circuit the operation and cancelling all this running f, and returning the first encountered Either.Left.suspend fun <A, B, E> Iterable <A>.parTraverseEither(f: suspend (A) -> Either<E, B>): Either<E, List <B>> Traverses this Iterable and runs all mappers f on CoroutineContext. If one of the f returns Either.Left, then it will short-circuit the operation and cancelling all this running f, and returning the first encountered Either.Left. suspend fun <A, B, E> Iterable <A>.parTraverseEither(ctx: CoroutineContext = EmptyCoroutineContext, f: suspend (A) -> Either<E, B>): Either<E, List <B>> |
parTraverseEitherN | Traverses this Iterable and runs f in n parallel operations on Dispatchers.Default. If one of the f returns Either.Left, then it will short-circuit the operation and cancelling all this running f, and returning the first encountered Either.Left.suspend fun <A, B, E> Iterable <A>.parTraverseEitherN(n: Int , f: suspend (A) -> Either<E, B>): Either<E, List <B>> suspend fun <A, B, E> Iterable <A>.parTraverseEitherN(ctx: CoroutineContext = EmptyCoroutineContext, n: Int , f: suspend (A) -> Either<E, B>): Either<E, List <B>> |
parTraverseN | Traverses this Iterable and runs f in n parallel operations on Dispatchers.Default. Cancelling this operation cancels all running tasks.suspend fun <A, B> Iterable <A>.~~parTraverseN~~(n: Long , f: suspend (A) -> B): List <B> suspend fun <A, B> Iterable <A>.parTraverseN(n: Int , f: suspend (A) -> B): List <B> Traverses this Iterable and runs f in n parallel operations on ctx. suspend fun <A, B> Iterable <A>.~~parTraverseN~~(ctx: CoroutineContext = EmptyCoroutineContext, n: Long , f: suspend (A) -> B): List <B> suspend fun <A, B> Iterable <A>.parTraverseN(ctx: CoroutineContext = EmptyCoroutineContext, n: Int , f: suspend (A) -> B): List <B> |
parTraverseValidated | Traverses this Iterable and runs all mappers f on Dispatchers.Default. If one or more of the f returns Validated.Invalid then all the Validated.Invalid results will be combined using semigroup.suspend fun <E, A, B> Iterable <A>.parTraverseValidated(semigroup: Semigroup<E>, f: suspend (A) -> Validated<E, B>): Validated<E, List <B>> Traverses this Iterable and runs all mappers f on CoroutineContext. If one or more of the f returns Validated.Invalid then all the Validated.Invalid results will be combined using semigroup. suspend fun <E, A, B> Iterable <A>.parTraverseValidated(ctx: CoroutineContext = EmptyCoroutineContext, semigroup: Semigroup<E>, f: suspend (A) -> Validated<E, B>): Validated<E, List <B>> |
parTraverseValidatedN | Traverses this Iterable and runs f in n parallel operations on Dispatchers.Default. If one or more of the f returns Validated.Invalid then all the Validated.Invalid results will be combined using semigroup.suspend fun <E, A, B> Iterable <A>.parTraverseValidatedN(semigroup: Semigroup<E>, n: Int , f: suspend (A) -> Validated<E, B>): Validated<E, List <B>> Traverses this Iterable and runs f in n parallel operations on CoroutineContext. If one or more of the f returns Validated.Invalid then all the Validated.Invalid results will be combined using semigroup. suspend fun <E, A, B> Iterable <A>.parTraverseValidatedN(ctx: CoroutineContext = EmptyCoroutineContext, semigroup: Semigroup<E>, n: Int , f: suspend (A) -> Validated<E, B>): Validated<E, List <B>> |
sequence | Sequences this Iterable of Resources. Iterable.map and sequence is equivalent to traverseResource.fun <A> Iterable < Resource <A>>.sequence(): Resource < List <A>> |
traverseResource | Traverse this Iterable and collects the resulting Resource<B> of f into a Resource<List<B>> .fun <A, B> Iterable <A>.traverseResource(f: (A) -> Resource <B>): Resource < List <B>> |
Do you like Arrow?
✖