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