import * as tsplus_module_1 from "@effect/core/stm/TMap/operations/takeFirstSTM";
import { concreteTSet } from "@effect/core/stm/TSet/operations/_internal/InternalTSet";
/**
 * Transactionally takes the first matching value, or retries until there is one.
 *
 * @tsplus fluent ets/TSet takeFirstSTM
 */

export function takeFirstSTM_(self, pf) {
  void 0;
  return tsplus_module_1.takeFirstSTM_(self.tmap, kv => pf(kv.get(0)));
}
/**
 * Transactionally takes the first matching value, or retries until there is one.
 *
 * @tsplus static ets/TSet/Aspects takeFirstSTM
 */

export const takeFirstSTM = pf => self => takeFirstSTM_(self, pf);
//# sourceMappingURL=takeFirstSTM.mjs.map