import * as tsplus_module_1 from "@effect/core/io/Effect/operations/succeedNow";
import * as tsplus_module_2 from "@tsplus/stdlib/data/Maybe/map";
import * as tsplus_module_3 from "@tsplus/stdlib/data/Maybe/getOrElse";
import * as tsplus_module_4 from "@effect/core/io/Effect/operations/flatMap";
/**
 * Extracts the optional value, or executes the effect 'orElse'.
 *
 * @tsplus fluent ets/Effect someOrElseEffect
 */

export function someOrElseEffect_(self, orElse, __tsplusTrace) {
  return tsplus_module_4.flatMap_(self, option => tsplus_module_3.getOrElse_(tsplus_module_2.map_(option, tsplus_module_1.succeedNow), orElse), __tsplusTrace);
}
/**
 * Extracts the optional value, or executes the effect 'orElse'.
 *
 * @tsplus static ets/Effect/Aspects someOrElseEffect
 */

export const someOrElseEffect = (orElse, __tsplusTrace) => self => someOrElseEffect_(self, orElse, __tsplusTrace);
//# sourceMappingURL=someOrElseEffect.mjs.map