I'm reading up on Monad tutorials, and the one I'm working on now is http://www.muitovar.com/monad/moncow.xhtml , but I ran on a problem with the state Monad, or to be more precise the runState accessor function.
The type is defined as
newtype State s a = State { runState :: (s -> (a,s)) }
and it's called e.g.
runState (chncasewst3 'e' 'd' 'f') False
I don't know how to read the definition for getting to the second line, especially because of the "State s a" part. If it where "State a s", I could deduce that the accessor has been curried 'as far' as the 's'.
So the question is; how to read the type definition so that I could see how to call the accessor function in this situation, and if possible how to read accessor functions per se.