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