Creating a StateSTM monad stack for executing STM operations