/** * Converts a `Effect, A>` into a `Effect>`. * The inverse of `right`. * * @tsplus getter effect/core/io/Effect unright */ export function unright( self: Effect, A> ): Effect> { return self.foldEffect( (either) => either.fold((b) => Effect.succeed(Either.left(b)), Effect.fail), (a) => Effect.succeed(Either.right(a)) ) }