// ets_tracing: off import * as O from "../Option/index.js" import type { Effect } from "./effect.js" import { map_ } from "./map.js" /** * Extracts the optional value, or returns the given 'orElse'. */ export function someOrElse(orElse: () => B, __trace?: string) { return (self: Effect>) => someOrElse_(self, orElse, __trace) } /** * Extracts the optional value, or returns the given 'orElse'. */ export function someOrElse_( self: Effect>, orElse: () => B, __trace?: string ): Effect { return map_(self, O.getOrElse(orElse), __trace) }