/** * Passes the success of this fiber to the specified callback, and continues * with the fiber that it returns. * * @tsplus static effect/core/io/Fiber.Aspects mapFiber * @tsplus static effect/core/io/RuntimeFiber.Aspects mapFiber * @tsplus pipeable effect/core/io/RuntimeFiber mapFiber * @tsplus pipeable effect/core/io/RuntimeFiber mapFiber */ export function mapFiber( f: (a: A) => Fiber ) { return (self: Fiber): Effect> => self.await.map((exit) => exit.fold( (cause): Fiber => Fiber.failCause(cause), (a) => f(a) ) ) }