Initial progress on second part of post on state monad