// ets_tracing: off import type * as Tp from "@effect-ts/system/Collections/Immutable/Tuple" import * as F from "@effect-ts/system/XPure" import type { XIO } from "./definition.js" /** * Lift a sync (non failable) computation */ export const succeedWith: (f: () => A) => XIO = F.succeedWith /** * Combines this computation with the specified computation. */ export const zip: (fb: XIO) => (fa: XIO) => XIO> = F.zip /** * Extends this computation with another computation that depends on the * result of this computation by running the first computation, using its * result to generate a second computation, and running that computation. */ export const chain: (f: (a: A) => XIO) => (self: XIO) => XIO = F.chain /** * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` * whose argument and return types use the type constructor `F` to represent * some computational context. */ export const map: (f: (a: A) => B) => (self: XIO) => XIO = F.map /** * Succeed with a value A */ export const succeed: (a: A) => XIO = F.succeed /** * Run the computation */ export const run = (self: XIO): A => F.run(self) /** * Returns a computation that effectfully "peeks" at the success of this one. */ export const tap: (f: (a: A) => XIO) => (self: XIO) => XIO = F.tap