"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mapMParUnordered = void 0;
// ets_tracing: off
const Function_1 = require("../../Function");
const chainPar_1 = require("./chainPar");
const fromEffect_1 = require("./fromEffect");
/**
 * Maps over elements of the stream with the specified effectful function,
 * executing up to `n` invocations of `f` concurrently. The element order
 * is not enforced by this combinator, and elements may be reordered.
 */
function mapMParUnordered(n) {
    return (f) => (self) => ((0, chainPar_1.chainPar)(n)((a) => (0, fromEffect_1.fromEffect)(f(a)))(self));
}
exports.mapMParUnordered = mapMParUnordered;
//# sourceMappingURL=mapMParUnordered.js.map