"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.flatMap = void 0;
exports.flatMap_ = flatMap_;

var _primitives = /*#__PURE__*/require("@effect/core/stm/STM/definition/primitives");

/**
 * Feeds the value produced by this effect to the specified function,
 * and then runs the returned effect as well to produce its results.
 *
 * @tsplus fluent ets/STM flatMap
 */
function flatMap_(self, f) {
  return new _primitives.STMOnSuccess(self, f);
}
/**
 * Feeds the value produced by this effect to the specified function,
 * and then runs the returned effect as well to produce its results.
 *
 * @tsplus static ets/STM/Aspects flatMap
 */


const flatMap = f => self => flatMap_(self, f);

exports.flatMap = flatMap;
//# sourceMappingURL=flatMap.js.map