4 add type annotation for state monad

Some types to the state monad module