/** * Returns an effect that swaps the error/success cases. This allows you to * use all methods on the error channel, possibly before flipping back. * * @tsplus getter effect/core/stm/STM flip */ export function flip(self: STM): STM { return self.foldSTM(STM.succeed, STM.fail) }