import * as tsplus_module_1 from "@tsplus/stdlib/data/Maybe/getOrElse";
import * as tsplus_module_2 from "@effect/core/stm/TMap/operations/get";
import * as tsplus_module_3 from "@effect/core/stm/STM/operations/map";
/**
 * Retrieves value associated with given key or default value, in case the key
 * isn't present.
 *
 * @tsplus fluent ets/TMap getOrElse
 */

export function getOrElse_(self, k, onNone) {
  return tsplus_module_3.map_(tsplus_module_2.get_(self, k), _ => tsplus_module_1.getOrElse_(_, onNone));
}
/**
 * Retrieves value associated with given key or default value, in case the key
 * isn't present.
 *
 * @tsplus static ets/TMap/Aspects getOrElse
 */

export const getOrElse = (k, onNone) => self => getOrElse_(self, k, onNone);
//# sourceMappingURL=getOrElse.mjs.map