cats-effect
cats-effect copied to clipboard
Add parFlatTraverseN and parFlatSequenceN
Add equivalents of the Parallel methods that allow flattening the result of a limited parallel traversal. These are helpful in case like big database lookups, where a set of IDs is batched, then each batch is queried and produces a collection of results that needs to be flattened into a larger result.
If #4451 is merged, the implementations in this PR should be aligned, either by delegation and flattening afterwards or by using a customised variant of the new code.
This is excellent but I'd definitely like to push pause until #4451 lands just to make sure we avoid creating more conflicting implementations. I'll try to prioritize getting that over the line.