I haven't seen many examples of the scalaz state monad. There is this example but it is hard to understand and there is only one other question on stack overflow it seems.
I'm going to post a few examples I've played with but I would welcome additional ones. Also if somebody can provide example on why init
, modify
, put
and gets
are used for that would be great.
Edit: here is an awesome 2 hours presentation on the state monad.