// ets_tracing: off import * as T from "../../../../Effect/index.js" import * as O from "../../../../Option/index.js" import type * as C from "../core.js" import * as MapEffect from "./mapEffect.js" /** * Extracts the optional value, or fails with the given error 'e'. */ export function someOrFail_( self: C.Stream>, e: () => E1 ): C.Stream { return MapEffect.mapEffect_( self, O.fold( () => T.fail(e()), (_) => T.succeed(_) ) ) } /** * Extracts the optional value, or fails with the given error 'e'. * * @ets_data_first someOrFail_ */ export function someOrFail(e: () => E1) { return (self: C.Stream>) => someOrFail_(self, e) }