import * as tsplus_module_1 from "@tsplus/stdlib/collections/Chunk/definition";
import * as tsplus_module_2 from "@tsplus/stdlib/collections/Chunk/flatMap";
import * as tsplus_module_3 from "@effect/core/stream/Stream/operations/map";
import * as tsplus_module_4 from "@effect/core/stream/Stream/operations/chunksWith";
/**
 * Maps each element to an Collection, and flattens the Collections into the
 * output of this stream.
 *
 * @tsplus fluent ets/Stream mapConcat
 */

export function mapConcat_(self, f, __tsplusTrace) {
  return tsplus_module_4.chunksWith_(self, chunk => tsplus_module_3.map_(chunk, chunk => tsplus_module_2.flatMap_(chunk, a => tsplus_module_1.from(f(a))), __tsplusTrace), __tsplusTrace);
}
/**
 * Maps each element to an Collection, and flattens the Collections into the
 * output of this stream.
 *
 * @tsplus static ets/Stream/Aspects mapConcat
 */

export const mapConcat = (f, __tsplusTrace) => self => mapConcat_(self, f, __tsplusTrace);
//# sourceMappingURL=mapConcat.mjs.map