typo: return type of runStateext_697914July 5 2011, 04:27:05 UTC
Hi Mike,
Under the section where runState, evalState and execState functions are shown, there is a typo in "runState returns the final (state, value) tuple". It returns the final (value, state) tuple.
Anyway, thank you for writing this series of tutorials! I've read up to this one and it's probably the clearest tutorials on monads I've read. I think the first tutorial in this series is a classic, especially the way you explain what a monad is.
I started teaching myself Haskell several months ago and have read both "Learn You a Haskell" and "Real-World Haskell", as well as several online tutorials, particularly on monads. I understood monads on an academic level, but could not "internalize" them. That is, until I read your tutorial series, especially the segment on the state monad. Yours is the clearest explanation of this difficult subject that I have seen to date.
Perhaps your might consider collecting your series into a single document and either self-publishing a booklet on Amazon, or at least producing a PDF for people to download. I know that I would add it to my reference library and refer others to read it.
Thanks for explaining this complex subject very clearly.
Comments 6
I have the book "Real World Haskell", but am learning far more from you just by concentrating on your articles on Monads.
Thank you, and please keep blogging.
Reply
Reply
Under the section where runState, evalState and execState functions are shown, there is a typo in "runState returns the final (state, value) tuple". It returns the final (value, state) tuple.
Anyway, thank you for writing this series of tutorials! I've read up to this one and it's probably the clearest tutorials on monads I've read. I think the first tutorial in this series is a classic, especially the way you explain what a monad is.
Reply
Reply
Perhaps your might consider collecting your series into a single document and either self-publishing a booklet on Amazon, or at least producing a PDF for people to download. I know that I would add it to my reference library and refer others to read it.
Thanks for explaining this complex subject very clearly.
-Ralph
Reply
Thanks very much for your kind words! I'll consider publishing this at some point, but I still have stuff to add e.g. on monad transformers.
Mike
Reply
Leave a comment