const fileName_1 = "(@effect/core) _src/io/Effect/operations/do.ts";
import * as tsplus_module_1 from "@effect/core/io/Effect/operations/map";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/flatMap";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/succeedNow";
export const bind_ = bind_1;
export const bindValue_ = bindValue_1;
/**
 * Binds an effectful value in a `do` scope
 *
 * @tsplus fluent ets/Effect bind
 */

function bind_1(self, tag, f, __tsplusTrace) {
  return tsplus_module_2.flatMap_(self, k => tsplus_module_1.map_(f(k), a => ({ ...k,
    [tag]: a
  }), __tsplusTrace), __tsplusTrace);
}
/**
 * Binds an effectful value in a `do` scope
 *
 * @ets_data_first bind_
 */


export function bind(tag, f, __tsplusTrace) {
  return self => bind_1(self, tag, f, __tsplusTrace);
}
/**
 * Like bind for values
 *
 * @tsplus fluent ets/Effect bindValue
 */

function bindValue_1(self, tag, f, __tsplusTrace) {
  return tsplus_module_1.map_(self, k => ({ ...k,
    [tag]: f(k)
  }), __tsplusTrace);
}
/**
 * Like bind for values
 *
 * @ets_data_first bindValue_
 */


export function bindValue(tag, f, __tsplusTrace) {
  return self => bindValue_1(self, tag, f, __tsplusTrace);
}
/**
 * @tsplus static ets/Effect/Ops Do
 */

export function Do() {
  return tsplus_module_3.succeedNow({}, fileName_1 + ":119:27");
}
//# sourceMappingURL=do.mjs.map