Effect of adding `Effect.forEachGen`

it would be better to had some effect like Effect.forEachGen to avoid this amount of complexity. because in some project im facing multiple nested foreach that should run concurently
  yield* Effect.forEach(inputs, (input) =>
    Effect.gen(function* () {
      let i = 0;
      yield* Effect.forEach(langs, (lang) =>
        Effect.gen(function* () {
          yield* Console.log(`-> ${++i}/${langs.length}:`, lang);
          yield* fn.createDirIfNotExists(`languages/${lang}`);
          const res = yield* fn.fetchCodeList(lang, input);
          yield* fn.saveObjectToFile(`languages/${lang}/${input}.json`, res);
        })
      );
    })
  );
Was this page helpful?