completed state monad examples