parSequence

fun <A> Iterable<Saga<A>>.parSequence(ctx: CoroutineContext = Dispatchers.Default): Saga<List<A>>

Alias for parTraverseSage { it }. Handy when you need to process List<Saga<A>> that might be coming from another layer.

i.e. when the database layer passes a List<Saga<User>> to the service layer, to abstract over the database layer/DTO models since you might not be able to access those mappers from the whole app.

Sources

common source
Link copied to clipboard