import * as tsplus_module_1 from "@tsplus/stdlib/data/Maybe/getOrElse";
import * as tsplus_module_2 from "@effect/core/stm/TRef/operations/update";
/**
 * Updates some values of the variable but leaves others alone.
 *
 * @tsplus fluent ets/TRef updateSome
 */

export function updateSome_(self, pf) {
  return tsplus_module_2.update_(self, a => tsplus_module_1.getOrElse_(pf(a), () => a));
}
/**
 * Updates some values of the variable but leaves others alone.
 *
 * @tsplus static ets/TRef/Aspects updateSome
 */

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