Merging Arrays from Two Effects Using Effect.all and flatMap

Hey, lets say we run 2 effects which both return an array using an Effect.all

How would you approach merging this 2 returned arrays in flatMap

e.g.

const documents = yield* Effect.all(
    [
        getDocuments(parsedData.accountSid, "v1"),
        getDocuments(parsedData.accountSid, "v2"),
    ], {
        concurrency: "unbounded",
    },
).pipe(Effect.flatMap(([docs_v1, docs_v2]) =>

));
Was this page helpful?