Example of ST monad with StateT